Programming in C


After going through the introduction I will directly teach you to make programs. I assume that you have already gone through the basic Data Types. The basic structure of the C program is:-

data-type function-name(list of parameters)
{
local variables
statement 1......
statement 2.......


statement n........
}


Every Program must have at least one function which is main() function. The program execution starts from this main() function.

The opening Brace( { ) indicates the starting point of the function and the closing brace ( } ) indicates the end of the function.

Within the opening and closing brace we can declare our local variables which acts as a storage area and the set of statements which we can execute it. Like:-

int main( )
{

-------Local Variables--------
int a,b;
------Set of Statements--------

printf(" Welcome to the program");
return 0;
}

0 Response to "Programming in C"

Post a Comment