how can we use static and extern?and where can we use this?

Answer Posted / vignesh1988i

static and extern are some types of storage classes in C...
there are four types of storage classes in C:
1) automatic (auto) storage class
2) static storage class
3) register storage class
4) extern storage class

static is a one which will be read only once by the compiler
(ie) it will ignore an another pass.... or it will be
initialized only once....... the scope of this class is
within the block only....

extern is a global declaration , but most of the compilers
dont prefer it to be used within a program.......


thank u

Is This Answer Correct ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file

662


I have seen function declarations that look like this

598


What is c system32 taskhostw exe?

582


Why is #define used?

788


What is the process of writing the null pointer?

605






write a c program in such a way that if we enter the today date the output should be next day's date.

1677


Why is not a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it is been freed?

596


write a C program:There is a mobile keypad with numbers 0-9 and alphabets on it. Take input 0f 7 keys and then form a word from the alphabets present on the keys.

14955


how to print the character with maximum occurence and print that number of occurence too in a string given ?

2029


Why is c fast?

601


What is page thrashing?

649


Explain what is the difference between far and near ?

649


What will be the outcome of the following conditional statement if the value of variable s is 10?

757


Explain what is the concatenation operator?

622


How pointers are declared?

558