Today a bought an book for C and C++
and I want to test the first programs
they are very simple: Here is one of them
Code:
#include <stdio.h>
int main(void) {
int num = 100;
printf("The number is %d", num);
return 0;
}
And I want to compile and execute it,but do not know how to do it
I tried with the command:
Code:
gcc -x C myprogram.c
The book I read is about ANSI C and I think that the code should work on Linux too ?
Thanks to everyone