a.Header files
Header files also known as include files, are standard library files that have an extension of (.h) and which are used to hold declaration for other files.
Consider the following program:
// header file example
#include<iostream.h>
Int main()
{
cout<<”Hello,world!”<<endl;
return 0;
}
Output of the program
Hello,world!
This program prints the string “Hello, world” to the screen using cout. However, this program nev-er defines cout, so how does the compiler know about the object cout? The answer for this is that cout has been declared in a header file called “iostream” . When the line # include <iostream.h> is used in the program,
the compiler locates and read all the declarations from a header file named
“iostream”.
the compiler locates and read all the declarations from a header file named
“iostream”.
b.Reserved words
Reserved words or keywords are those words which have their special
meaning within the C++ language and are reserved for some specific purpose .C++ reserved words cannot be used for any other purpose in a C++ program and even cannot be used as variables.Here is a list of C++ keywords shown in Table.
meaning within the C++ language and are reserved for some specific purpose .C++ reserved words cannot be used for any other purpose in a C++ program and even cannot be used as variables.Here is a list of C++ keywords shown in Table.
0 comments: