What are Storage Classes in C ?
Answer Posted / laxmikant
C supports 4 types of storage class. They are given
hereundr:-
1> Extern
2> static
3> Register
4> Auto
By default a variable defined inside a block is a auto
variable.It has block level scope.Regsiter storage class
indicates that the variable is stored in the CPU rather
than Memory. So the opeartion is faster because accessing
register is faster then memory.Extern indicates that the
effect of the variable is realised in every object modules.
And finally static .If it is defined inside the
function ,then it's retian its value during different
function call.And it's life is through out the program.And
it's initilized only once.
| Is This Answer Correct ? | 27 Yes | 9 No |
Post New Answer View All Answers
How to implement a packet in C
What are the functions to open and close the file in c language?
How would you obtain the current time and difference between two times?
.find the output of the following program? char*myfunc(char*ptr) { ptr +=3; return (ptr); } int main() { char*x,*y; x="HELLO"; y=myfunc(x); printf("y = %s ",y); return 0; }
What is ambagious result in C? explain with an example.
When do we get logical errors?
explain what is fifo?
Is it possible to pass an entire structure to functions?
Can we compile a program without main() function?
What is return in c programming?
What is variable and explain rules to declare variable in c?
If i have an array 0 to 99 i.e,(Size 100) I place the values 1 to 100 randomly like a[0]=29,a[1]=56 upto array[99].. the values are only between 1 to 100. getting the array values by using scanf.. If i entered one wrong element value line a[56]=108. how can i find it.. and also how to find the missing value in 1 to 100.. and i want to replace the missing values.. any one of them know please post your answer..
What is an auto variable in c?
What is a pointer variable in c language?
Write a program to check palindrome number in c programming?