C programming language (BCA-1st semester)


C programming definition


C is a popular general purpose programming language.It is designed and developed Dennis Ritchie in 1972. It is simple core language with mathematical file headling and library function.


C programming function


  1. C language is a middle level language.
  2. It is a procedure programming paradigm.
  3. It is more flexible and portable language.
  4. It is a structure language.
  5. It allows variable scope and recursion.

Structure of C language                                               Example


Document section                                                    /* Area of circle*/
Link section                                                             #include<studio.h>
                                                                                     #include < conio.h>
Define section                                                             define PI 3.14
Main function                                                             Void function ()
{.                                                                                      {
Declaration part                                                       float r,A;
Executable part                                                          Printf("Enter radius");
                                                                                       scanf("%f" , & r);
                                                                                       A= PI *r * r;
                                                                                       printf("%f" , A);
                                                                                       getch ();
}                                                                                       }


Document section


It is not necessary in a program. It is consist of comments and program information
.

Link section


It include some header file for function definition that are used in program.this section compile and link main program.

Global Declaration


These variable must be declare outside of all the function through# define directive.

Main function


Every program in c must contain main function.The execution of program always start with function main (). It is consist of Dec declaration and executable part

No comments:

Post a Comment

If you have any doubts, Please lets me know and Please Follow our Website