Skip to main content

Posts

Showing posts with the label keywords

Keywords in C programming

There are certain reserved words, called keywords that have standard, predefined meanings in C. These keywords can be used only for their intended purpose, they cannot be used as programmer-defined identifiers. The standard keywords are: auto, break, case, char, const, continue, default, do, double, else, enum, extern, float, for, goto, if, int, long, register, return, short, signed, sizeof, static, struc, switch, typedef, union, unsigned, void, volatile, while. The keywords are all lowercase. Since upper and lowercase characters are not equivalent, it is possible to utilize an uppercase keyword as an identifier. Normally, however, this is not done, as it is considered a poor programming practice.

C Tokens(C programming Basics)

In a passage of text, individual words and punctuation marks are called tokens. Similarly, in a C program the smallest individual units are also known as C tokens. C has six types of tokens: 1. Identifiers e.g. x area __ temperature PI 2. Keywords e.g. int float for while 3. Constants e.g. -15.5 100 4. Strings e.g. “ABC” “year” 5. Operators e.g. + - * 6. Special Symbols e.g. ( ) [ ] { }