Statements in C

Assignment Statements
The assignment operator used for assigning values to the variables.
Example :          basic = 2977;
                           dob = 2977;
                           flag = 0;
                           l=a=k=2977;

Null Statements
A statement without any characters and it has only semicolon is called null statement.
Example :  ; (null statement)

Block Of Statements
Block contains several statements that are enclosed within a pair of braces {}. These can be any of expression, assignments and keywords etc.
Example :{
                            int a=2977;
                           float b=29.77;
                           printf("%d%f", a,b);
               }

Expression Statements
These consists of expressions and can be arithmetic, relational or logical.
Example :               a=29
                              b=a+77

                              fun(a,b);

No comments:

Post a Comment

Copyright © EduRAR @ www.edurar.blogspot.in