Keywords in C



Keywords in C

  • Keywords are the special words those meaning already defined in compiler.
  • Keywords are part of the syntax and they cannot be used as an identifier.
  • Keywords cannot be used as Variable Name.
  • There are 32 Keywords in C programming.
  • C Keywords are also called as Reserved words.

C Keywords

Read Also

Long int in C

There are 32 Keywords in C Programming :

keywords syntax description
1.auto [auto] data-definition; Defines a local variable having a local lifetime.
2.break break; Passes control out of the compound statement.
3.case case constant-expression: The list of possible constant-expression values determined from all case statements is searched for a match.
4. char char variable_name; Char datatype Specifies the character type of the value a variable will hold
5. const const variable-name [ = value]; Makes variable value or pointer parameter unmodifiable.
6.continue continue: Passes control to the beginning of the loop..
7.default default: If a match is not found, its goto default statement.
8.do do statement while (expression): Keyword “do” is usually used together with while , to make another form of repeating statement.
9.double double variable_name: Represents a double precision floating point data type.
10.else In C Language, else extends an if statement to execute a statement if statement evaluates FALSE instead of TRUE..
11.enum enum [tag] {name [=value], ...}; enum is the user defined data type.
12.extern extern data-definition;extern function-prototype; extern keyword means "declare without defining". By default, the declaration and definition of a C function have “extern” with them.
13.float float variable_name: Floating point is a data type in terms of decimal format ..
14.for for ([expr1]; [expr2]; [expr3]) statement For-loop is yet another kind of loop.
15.goto goto identifier; Unconditionally transfer control..
16.if if (expression)statement1 Floating point is a data type in terms of decimal format ..
17.int int variable_name; Floating point is a data type in terms of decimal format ..
18.long Long variable_name; Specifies a variable that will hold fairly large integer type of data..
19.register register data-definition; Tells the compiler to store the variable being declared in a CPU register...
20.return return [expression]; Exits immediately from the currently executing function to the calling routine, optionally returning a value. ..
21.short short variable_name Specifies a variable that can hold fairly small integer type of data.
21.signed Specifies a variable that can hold positive and negative integer type of data.
22..signed Specifies a variable that can hold positive and negative integer type of data.
23.sizeof sizeof expressionsizeof (type) Returns the size of the expression or type.
24.static static data-definition;static function-definition; Preserves variable value to survive after its scope ends..
25.struct struct [struct-type-name] {[type variable-names] ;...} [structure-variables] ; Specifies a variable that can hold positive and negative integer type of data.
26.switch switch (expression) statement Switch causes control to branch to one of the list of possible statements in the block of statements..
27.typedef typedef type-definition identifier; In C language typedef keyword is used to explicitly associate a type with an identifier..
28.union union [union-type-name]{type variable-names;...} [union-variables] ; Groups variables which shares the same storage space. Apart from this Union is used for grouping different types of variables under the single name ..
29.unsigned unsigned variable_name; Specifies a variable that can hold only the positive integer type of data..
30.void typedef type-definition identifier; In C language typedef keyword is used to explicitly associate a type with an identifier..
31.volatile volatile data-definition; In C , It tells the compiler that the value of the variable may change at any time- without any action being taken by the code ..
32.while while (expression) statement Repeats execution while the condition is true..


View More Quick Examples


Related Searches to Keywords in C