A simple C code

 

 

Compiler: Visual C++ Express Edition 2005

Compiled on Platform: Windows XP Pro SP2

Header file: Standard

Additional library: none/default

Additional project setting: Set project to be compiled as C

Project -> your_project_name Properties -> Configuration Properties -> C/C++ -> Advanced -> Compiled As: Compiled as C Code (/TC)

 

 

/* preprocessor directives - header files for printf(), scanf() & other standard i/o */

#include <stdio.h>

 

/* main() function with no argument and int return value - return to system */

int main(void)

{

printf("Testing 1...2...3...\n");

printf("Hello dude!\n");

return 0;

}

 

Output example:

 

Testing 1...2...3...

Hello dude!

Press any key to continue . . .

 

 

C and C++ Programming Resources | C & C++ Code Example Index