What are Storage Classes in C ?
Answer Posted / bibhuti bhusan basantaray
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 ? | 17 Yes | 11 No |
Post New Answer View All Answers
How can I pad a string to a known length?
The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration
How can this be legal c?
Given a valid 24 hour format time find the combination of the value and write a program ,do not hard the value and if any other inputs provided should work with the logic implemented Input: 11:30 Output: 13:10 Input: 18:25 Output: 21:58
Explain what is a 'locale'?
what are bit fields? What is the use of bit fields in a structure declaration?
Explain the bubble sort algorithm.
A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor
Why is c so powerful?
write a program to generate address labels using structures?
What are derived data types in c?
Write a code to remove duplicates in a string.
What are the types of operators in c?
Is it possible to have a function as a parameter in another function?
A banker has a seif with a cipher. Not to forget the cipher, he wants to write it coded as following: each digit to be replaced with the difference of 9 with the current digit. The banker chose a cipher. Decipher it knowing the cipher starts with a digit different than 9. I need to write a program that takes the cipher from the keyboard and prints the new cipher. I thought of the following: Take the input from the keyboard and put it into a string or an array. Go through the object with a for and for each digit other than the first, substract it from 9 and add it to another variable. Print the new variable. Theoretically I thought of it but I don't know much C. Could you give me any kind of hint, whether I am on the right track or not?