Words That Have Special Meaning in A Programming Language Are Called ——-

Words that have special meaning in a programming language and make readable to a program are called keywords. Various websites, books, and articles have wrong concepts about keywords and reserve words that “ All keywords …

Special Meaning in A Programming Language

Words that have special meaning in a programming language and make readable to a program are called keywords. Various websites, books, and articles have wrong concepts about keywords and reserve words that “ All keywords are reserved words in our programming language that have a specific meaning”. This concept is wrong because, in a programming language, reserve words are words that are reserved to use in the future in a language. Not all but most of the keywords are reserve words and vice versa.

As above procedure shows that all the predefined functions and keywords are declared in the compiler.

Keywords

Keywords are pre-defined words in a compiler in the programming language that stored some specific meaning in them. For example, some keywords use for data type, some keywords use for data structure, some keywords use for conditional structure, and some for repetitive structures. Keywords and reserve words can only use for a specific purpose. Programmers cannot use specific keyword names such as int, string, or float names used to create and define their variable data type. In practical usage, reserve words are keywords. Keywords are pre-defined and cannot be used as an identifier. User-defined functions are not keywords.

  • According to literature, C language contains 32 keywords that are also keywords of C++ language.
  • Fortran has no reserved words, all keywords such as if then, else, etc., are used as identifiers

Reserve Words

Reserve words are the keywords that are reserve to use and cannot be used as the name of identifiers. There are no distinct definition reserve words except this. Many of the Reserve words that are reserve to use in the future are future keywords.

size of is the only word that is both keyword and operator.

Example 

char float = ’2.3’;

This is a compiler error because you use the float keyword as a user-defined variable.

Identifiers

Identifiers are user-defined functions and variable names. It is provided the name of method  or variable by a user. 

The difference between reserve and keywords

Keywords and reserve words cannot be defined by the user, their functionalities are defined in the compiler. They must be letters. We cannot use them for naming variables, methods, or classes. In practice, reserve words are reserve for future modification of language and keywords are the modified form of reserve words.

C++ language Keywords and reserve words List

If and elseAutoregister
gotoReturnbreak and continue
charVoidint
constenumwhile
switch and casetypedefStruct
float and doubledo-while loopauto
endlestringcout
cinincludestd
INT_MAXINT_MINMAX_RAND
mainnposNULL

Conclusion

Words that have special meaning in a language are called  Keywords. Keywords are the pre-defined words that have special functionalities to the compiler. Reserve words cannot be used as the name of a user-defined class, method, or variable. They have some specific meaning. 

Categories AI

Leave a Comment