Saturday, February 12, 2011

Let We C Session-3 [Structures]

Structures:

Function: 

  • Single level function
  • Multilevel Function
Single level function:

Sample program

main()       \*program start execution right over here,that is the compiler start run from here*\

{               \*start of the program*\

printf("hello"); \*to display the message*\

}                \*end of the program*\

this are all above are preceding functions.
; =>> implies that end of execution statement.
 

Multilevel Function:

Sample Program;

main()
{
printf("hello");
disp_msg();
printf("Welcome to World");
 }
disp_msg();
{
prinf("MR.XXX");
}

disp_msg(); =>> Programmer-defined function that can be independently called by other function
( )                =>>This is implies that passing values to the function,whether any receiving function is excepting any parameter.

Next session is Input/Output functions....

No comments:

Post a Comment