all in one gsm tool

Breaking


Tuesday 9 April 2019

C Header files and Reserved Keywords in C++ - What is Keywords in C/C++

C Header files and Reserved Keywords in C++ - What is Keywords in C/C++ - C Header files and Reserved Keywords of C++ Definition and Examples...




Header files and Reserved words in C++



Header files and Reserved Keywords in C++


Header files:

C Header files are standard library files that have an extension of <.h> and which are used to hold declarations for other files.

Consider the following program:

//C Header files 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 never 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> is used in the program, the compiler locates and read all the declarations room a C Header files named "iostream"



Reserved words:

reserved words are 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 C++ language and even cannot be used as variables. Here is a list of C++ keywords shown in table below:

Header files and Reserved Keywords in C++






No comments:

Post a Comment