Tuesday, June 28, 2011

what is int main() ???


–C programs contain one or more functions, exactly one of which must be main
–Parenthesis used to indicate a function
–int means that main "returns" an integer value
–Braces ({ and }) indicate a block
•The bodies of all functions must be contained in braces
 
Example:
#include <stdio.h>

int main()
{ // block start

    printf("Welcome To Huzaifa's Blog\n");

    return 0 ; // return an integar value i.e 0

} // block end

No comments:

Post a Comment