-1

I am new to C language but I use Gitpod for other languages. I would like to know how to run this simple "hello world" main.c program from the Gitpod interface step by step?

#include <studio.h>
void main(){
    printf("hello")
}

Many thanks !

pmg
  • 106,608
  • 13
  • 126
  • 198
user2030243
  • 49
  • 1
  • 6

3 Answers3

2

After fixing the errors you can compile the code with gcc main.c and run the binary a.out. Errors as already mentioned:

  • studio.h -> stdio.h
  • ...hello") -> ...hello");
Wulf Thimm
  • 36
  • 1
  • Thanks Wulf Thimm. Errors in the code were not really the point for me at this moment. And how to run the code solve my issue. – user2030243 Jan 19 '21 at 15:53
0

after the printf("hello") you should put ;

//like this
printf("hello");
0
#include <stdio.h>
int main(){
    printf("hello");
    return 0;
}
Itati
  • 193
  • 11