Code Point Blog
Iam presenting here ,all type of knowledge if you want to interest knowing about any topic then click below thumbnail view button and knowing.
Keywords and identifiers in the C programming language are fundamental concepts, and their definitions are not copyrighted. Here's a summary of C keywords and identifiers:
1. Keywords: Keywords are reserved words in C that have specific meanings and functionalities. They cannot be used as identifiers (variable names, function names, etc.) in the program. Here are the C keywords:
There are 32 keywords in C Programming
auto ,break, case, char, const,
continue, default do, double, else,
enum, extern, float, for goto,
if, inline, int long, register,
restrict, return, short, signed,, sizeof,
static, struct, switch, typedef, union,
unsigned, void, volatile, while,
_Bool, _Complex, _Imaginary,
2.Identifiers: Identifiers are names used for variables, functions, labels, and other user-defined entitie in the C program. They must follow specific rules:
The first character must be an alphabet letter (uppercase or lowercase) or an underscore _.
After the first character, an identifier can consist of letters, digits, and underscores.
Example :
count
_myVar
temp123
result
It's important to note that C is case-sensitive, so myVar and myvar would be considered two different identifiers.
Here's an example of using a keyword and an identifier in a C program:
#include <stdio.h>
int main() {
int number = 42; // 'int' is a keyword, 'number' is an identifier
printf("The number is %d.\n", number);
return 0;
}
In this example, int is a keyword that indicates the data type of the variable number, and number is an identifier representing a variable storing the value 42.