keywords in c
There are certain words that are reserves for doing specific task.
These all words are known as C keywords and Reserve words and they all standard. Each words have predefined meaning in c.
The Keywords are specific reserved words in C language. Each words have predefined meaning in c.
all the words which help us use the functionality of the C language are included in the
list of keywords. All the words we will use in the C language will be either keywords or identifiers!
They all keywords written in lowercase. There are 32 keywords in c language These all are giving below
C keywords and Reserve words
‘
auto |
break |
char |
case |
double |
else |
enum |
extern |
float |
for |
goto |
if |
int |
long |
register |
return |
short |
sizeof |
signed |
static |
switch |
struct |
typedef |
union |
unsigned |
volatile |
while |
void |
continue |
auto |
default |
do |
Automatic
when all the variable declare any where inside a function/block without any storage class specifier are automatic variable. we can also use auto keyword to declare automatic variables. in this example both function have local variables both are equals
fun1()
{
x,y;
……
……
}
fun2()
{
x,y;
……
……
}
|
break
Break statement used inside in any loop or switch statements. Sometimes it is necessary to go outside from the loop even before the loop condition becomes false. in such conditions when terminates the loop break statement is used. This break statement cause an immediate exit from the loop in which break statement appear. example it is written as
break;
when break statement is encounter control is transfer immediately out from the loop. If break written a nested loop structure then it causes exit from the innermost loop.
/* program to understand the use of break*/
main()
{
i;
(i=0;i<=10;i++)
{
(i==5)
printf("\n i=%d",i);
}
0;
}
|