C Programming (Chapter - 2)

in education •  7 years ago  (edited)

C Keywords

image

C Operators

image

Qualifier

Qualifier is an extra name given to either variables or functions , showing an extra quality or extra meaning for that variable or function.

  • Size qualifiers- It tells the size of basic data type. E.g. short, long short int

  • Sign qualifiers- It tells the sign of the variable +ive or -ive E.g. signed , unsigned

  • Constant qualifiers/modifier - It can be declared with keyword const. An object declared by const cannot be modified.
    const int i=10;
    float const f=0.0f;
    unsigned const long double ld=3.14L;

Example
void main()
{
const int a=5;
a++;
printf(“%d”,a);
}

output : compiler error, cannot modify const variable.

  • Volatile qualifiers - A variable is declared volatile when it’s value is changed external source from outside the program. “volatile” keyword is used.

(There is another type qualifier near, far, huge, which qualify only pointer type data type ,interrupt is also qualifier of data)

@naymyoaung
follow and vote for more chapters

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!