At AT & T's Bell Labs in the year 1972 Dennis Ritchie, head of the system software research Department developed one of the most efficient languages of all the times Called C. He incorporated some new features of his own along with BCPL ( Basic Combined Programming Language ) and Language B. Day by day C evolved as a compact, coherent and powerful 'one man language'.
Basic Structure of a C Program
Basic Structure of a C Program
- C is a case - sensitive language. (Statements are generally written in lower case letters).
- Any C statement ends with a semicolon (;).
- Blank spaces can be inserted between two distinct words to enhance the readability of the statement. ( Spaces are forbidden while declaring a variable )
- A program may contain one or more #include statements, which is known as 'Preprocessor Directives'. ( A Preprocessor process the program before compiler do ).
- main() function is an essential part of C language, where execution of the program starts. ( You must define the main () function in the program. )
- main() function can be placed anywhere in the program but the execution starts from there only. The group of sentences within the main() function are executed sequentially.
- Comments can be inserted in a program to increase the clarity of the motive of the program. ( Comment statements must be enclosed with /*...*/ in a C program.
- Certain headers files are necessary for compiling a C program. 'stdio.h' is an example of a header file, which controls the functions performing the tasks of input and output.
- A program can consists of one or more functions , which is actually a group of C statements that are executed together.
No comments:
Post a Comment