Keywords in C

Keywords in C

Keywords are tokens which are used for their intended purpose only. Each keyword has fixed meaning or predefined meaning and that cannot be changed by user. Hence, they are also called reserved-words

There are totally 32 keywords. All keywords are written in lowercase letters. 

auto : The auto keyword declares automatic variables. Variables declared within function bodies are automatic by default. 

break and continue: The break statement makes program jump out of the innermost enclosing loop (while, do, for or switch statements) explicitly. The continue statement skips the certain statements inside the loop. 

switch, case and default : The switch and case statement is used when a block of statement has to be executed among many blocks/alternatives.

char : The char keyword declares a character variable. 

const: An identifier can be declared constant by using const keyword. 

do...while: do...while are used to repeat set of statements

double and float: Keywords double and float are used for declaring floating type variables. 

if and else: if and else are used to make decisions. 

enum: Enumeration types are declared in C programming using keyword enum. 

extern: The extern keyword declares that a variable or a function has external linkage outside of the file it is declared. 

for: for is used to repeat set of statements

goto: The goto keyword is used for unconditional jump to a labeled statement inside a function

int: The int keyword declares integer type variable.

short, long, signed and unsigned: The short, long, signed and unsigned keywodrs are type modifiers that alters the meaning of a base data type to yield new type. 

return: The return keyword terminates the function and returns the value

sizeof: The sizeof keyword evaluates the size of a data (a variable or a constant).

register: The register keyword creates register variables which are much faster than normal variables. 

static: The static keyword creates static variable. The value of the static variables persists until the end of the program.

struct: The struct keyword is used for declaring a structure. A structure can hold variables of different types under a single name. 

typedef: The typedef keyword is used to define user defined name for a datatype.

union: A Union is used for grouping different types of variable under a single name for easier handling.

void: The void keyword indicates that a function doesn't return value. 

volatile: The volatile keyword is used for creating volatile objects. A volatile object can be modified in unspecified way by the hardware.

Latest Current Affairs 2024 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2024 Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz