1) What is a C Storage Class.?
A) C Storage decides where to or which memory store the variable.
B) C Storage Class decides what is the default value of a variable.
C) C Storage Class decides what is the Scope and Life of a variable.
D) All the above.
A) TypeB) Storage ClassC) Both Type and Storage ClassD) Either Type or Storage Class
A) staticB) autoC) register & externD) All the above
A) staticB) autoC) registerD) extern
A) auto variable is stored in 'Memory'.static variable is stored in 'Memory'.extern variable is stored in 'Memory'.register variable is stored in 'Memory'.
B) auto variable is stored in 'Memory'.static variable is stored in 'Memory'.extern variable is stored in 'Memory'.register variable is stored in 'Register'.
C) auto variable is stored in 'Register'.static variable is stored in 'Register'.extern variable is stored in 'Register'.register variable is stored in 'Memory'.
D) auto variable is stored in 'Register'.static variable is stored in 'Register'.extern variable is stored in 'Register'.register variable is stored in 'Register'.
A) RAM ( Random Access Memory )B) ROM ( Read Only Memory )C) CPU (Central Processing Unit )D) DMA ( Direct Memory Access )
A) ROMB) RAMC) CPUD) Compiler
A) Default value of auto variable = Garbage ValueDefault value of static = Garbage ValueDefault value of extern = Garbage ValueDefault value of register = Garbage Value
B) Default value of auto variable = zeroDefault value of static = zeroDefault value of extern = zeroDefault value of register = zero
C) Default value of auto variable = GarbageDefault value of static = zeroDefault value of extern = zeroDefault value of register = Garbage
D) Default value of auto variable = zeroDefault value of static = GarbageDefault value of extern = Garbage
Default value of register = zero
A) Scope of auto variable = local to block or functionScope of register variable = local to block or functionScope of static variable = local to block or functionScope of extern variable = global or available to all functions and blocks
B) Scope of auto variable = global or available to all functions and blocksScope of register variable = global or available to all functions and blocksScope of static variable = global or available to all functions and blocksScope of extern variable = local to block or function
C) Scope of auto variable = global or available to all functions and blocksScope of register variable = local to block or functionScope of static variable = global or available to all functions and blocksScope of extern variable = local to block or function
D) Scope of auto variable = local to block or functionScope of register variable = global or available to all functions and blocksScope of static variable = local to block or functionScope of extern variable = global or available to all functions and blocks
A) Life of an auto variable = persists between function callsLife of an register variable = with in the block or functionLife of an static variable = persists between function callsLife of an extern variable = until program endsB) Life of an auto variable = persists between function callsLife of an register variable = until program endsLife of an static variable = persists between function callsLife of an extern variable = with in the block or functionC) Life of an auto variable = until program endsLife of an register variable = until program endsLife of an static variable = until program endsLife of an extern variable = until program endsD) Life of an auto variable = with in the block or functionLife of an register variable = with in the block or functionLife of an static variable = persists between function callsLife of an extern variable = until program ends
A) registerB) autoC) staticD) extern
A) autoB) registerC) staticD) extern
A) A static global variable can be accessed in other files.B) A static global variable can be used only in a file in which it is declared.C) A static global variable can not be declared without extern keyword.D) Default value of a static variable is -1.
A) Variable a is stored in CPU registers for fast access.B) Variable a is converted to int and then stored in a CPU register.C) register Storage Class is ignored and treated asauto float a = 3.14f;D) You get a compiler error as you can not store non integer value in a CPU register.
A) Declaration does allocate memory for a variable.Definition does allocate memory for a variable.B) Declaration does allocate memory for a variable.Definition does not allocate memory for a variable.C) Declaration does not allocate memory for a variable.Definition does allocate memory for a variable.D) Declaration does not allocate memory for a variable.Definition does not allocate memory for a variable.
A) A non static global variable can not be used in included files.B) A non static global variable can be used or referred to inside included files.C) A non static global variable does not live till the end of program execution.D) None of the aboveD) 4, 6, 8
A) Re-declaration of a variable is Ok.B) Redefinition of a variable is not Ok.C) Definition of a variable uses memory blocks.D) All the above.
A) Register variables are usually fast retrieving variables.B) Static variables are usually maintain their values between function calls.C) Auto variables release their memory after the block or function where they are declared.D) All the above.
A) Variables of type auto are stored in Stack memory.B) Variable of type Static are stored in Segmented Memory.C) Variables of type register are stored in Micro Processor Memory.D) All the above.
A) Variables of type auto are initialized fresh for each block or function call.B) Variables of type static are initialized only first time the block or function is called.C) Variables of type register are initialized each time the block or function is executed.D) All the above.