Storage Classes
Gapfill exercise
Enter your answers in the gaps. When you have entered all the answers, click on the "Check" button.
what is Automatic storage class?
Automatic variables are allocated memory automatically at
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
.
1.The visibility of the
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
variables is limited to the block in which they are defined.
2.The
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
of the automatic variables is limited to the block in which they are defined.
3.The automatic variables are initialized to
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
by default.
4.The
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
assigned to automatic
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
gets freed upon exiting from the block.
5.The
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
used for defining automatic variables is auto.
6.Every local variable is automatic in C by
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
.
what is Static storage class?
1.The variables defined as static specifier can hold their value between the
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
function calls.
2.
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
local variables are visible only to the function or the
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
in which they are defined.
3.A same static variable can be declared many times but can be assigned at only one time.
4.Default initial value of the static
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
variable is 0 otherwise
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
.
5.The visibility of the static
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
variable is limited to the file in which it has declared.
6.The
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
used to define static variable is static.
what is Register storage class?
1.The variables defined as the register is allocated the memory into the CPU registers depending upon the size of the
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
remaining in the CPU.
2.We can not dereference the register variables, i.e., we can not use &operator for the
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
variable.
3.The access time of the register
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
is faster than the
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
variables.
4.The
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
default value of the register local variables is 0.
5.The register keyword is used for the
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
which should be stored in the CPU
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
. However, it is compiler?s choice whether or not; the variables can be stored in the register.
6.We can store
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
into the register, i.e., a register can store the
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
of a variable.
7.Static variables can not be stored into the register since we can not use more than one
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
specifier for the
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
variable.
what is External storage class?
1.The external
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
class is used to tell the compiler that the variable defined as extern is declared with an external linkage elsewhere in the program.
2.The
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
declared as
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
are not allocated any
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
. It is only
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
and intended to specify that the variable is declared elsewhere in the program.
3.The default initial value of external
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
type is 0 otherwise
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
.
4.We can only
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
the extern variable globally, i.e., we can not initialize the external variable within any block or method.
5.An external variable can be declared many times but can be
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
at only once.
6.If a
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
is declared as external then the
address
automatic
block
compiler
declaration
default
extern
garbage
global
initial
initialize
initialized
integral
keyword
memory
multiple
null
pointers
register
runtime
same
scope
Static
storage
variable
variables
searches for that variable to be initialized somewhere in the program which may be extern or static. If it is not, then the compiler will show an error.
Check
OK