PDF

Basics

Leave a Comment
Functions is block or part of the program. Every C program has at least one function which is main(), and all the most trivial programs can define additional functions.

Example:

#include<stdio.h>
int main()                // execution starts from here
{
        //statements will be written here 
return 0 ;
}


NOTE: When trying on compiler you need to add a statement called getch() before return 0 and header file at the top called #include<conio.h> so as to make output stationary on your computer output window. Otherwise output window will get close in a milliseconds like Flash.

Example:

#include<stdio.h>
#include<conio.h>
int main()               //execution start from here 
{
          //statements will be written here 
getch();
return 0;
}


There are Two Types of Functions

  • Build in Functions

The Functions those are provide by C Language are refers to the Built in Functions. Example printf, scanf  that we will discussing details in separate session.

  • User Defined Functions

But in the other hand the functions those are developed by the user for their programs are know as User Defined Functions. That will be discussed in separate session.


0 comments:

Post a Comment