Sunday, November 8, 2020

Structure of C program

 The general structure of a C program is


Preprocessor directives tells the preprocessor to look for special code libraries, make substitutions
in the code and in other ways prepare the code for translation into machine language.

Declaration is the program statement that serves to communicate to the language translator information about the name and type of the data objects needed during program execution.

The basic idea behindthe global declaration is that all global declared are visible to all parts of the program.

All functions including main() can be divided into two sections – local definition and statements

Local definitions would be at the beginning of the functions which is followed by statement section. It describes the data that will be used in the function. Data objects in local definitions as opposed to global declarations are visible only to the function that contains them.

Statement section consists of the instructions that cause the computer to do some work.

0 comments:

Post a Comment

Data Structures with C++



NET/SET/CS PG



Operating Systems



Computer Networks



JAVA



Design and Analysis of Algorithms



Programming in C++

Top