A Gift For You! Essay

1739 Words7 Pages
NECESSARY BUT NOT SUFFICIENT MATERIAL FOR CPU Chapter 1 • Structure of C Programs: Documentation section: The documentation section consists of a set of comment lines giving the details of the program like who created the program,date,it’s purpose etc…. Link Section: The link section provides instructions to the compiler to link functions from the system library.e.g., #include,#include. Definition Section: Definition section defines all symbolic constants. #define PI 3.14 Global Declaration Section: Variables which can be used by all the functions in a program is known as global variable and is declared outside all the functions. The global variables are declared in the global declaration section. Main function: Every C program must have one main function section. The program execution begins here. Sub program section: Contains all the user-defined functions that are called in the main function. Chapter 2 Tokens: In a passage of text, individual words and punctuation marks are called tokens. Similarly in a C program the smallest individual units are known as C tokens. Keywords: Keywords are the tokens in C program that have a fixed meaning that cannot be changed. Keywords are reserved by the system and user can’t use it as an identifier.All keywords must be written in lower case. E.g. float, while,goto,int,if,break….. Identifiers: Identifiers refer to the names of variables, functions and arrays. These are user-defined names. E.g i,main(),str[10]….. Constants: Constants refer to fixed values that do not change during the execution of a program. Variable: A variable is a data name that may be used to store a data value. Unlike constants a variable’s data can change. Variable Declaration: Declaration of a variable does two things: 1. It tells compiler what the name
Open Document