C examples for Language Basics:Hello World
Define int type variable and output its value
#include <stdio.h> int main(void) { int num; /* define a variable called num */ num = 1; /* w w w. j a v a 2 s .co m*/ printf("test "); printf("test.\n"); printf("My favorite number is %d. some text after the number.\n",num); return 0; }