edited by
1,782 views
0 votes
0 votes

Match the following $:$

$\begin{array}{cIcI}   & \textbf{List – I} && \textbf{List – II} \\  \text{a.} & \text{Automatic Storage} & \text{i.} & \text{Scope of the variable is global}\\ & \text{Class}  \\  \text{b.} &  \text{Register Storage } & \text{ii.} & \text{Value of the variable persists between }  \\ & \text{Class} && \text{different function calls}\\  \text{c.} &  \text{Static Storage} & \text{iii.} & \text{Value stored in memory and local to the block} \\ & \text{Class} && \text{in which the variable is defined}\\  \text{d.} &   \text{External Storage} & \text{iv.} & \text{value stored in CPU registers} \\ &  \text{class} \\    \end{array}$

$\textbf{Codes :}$

  1. $\text{a-iii; b-iv; c-i; d-ii}$
  2. $\text{a-iii; b-iv; c-ii; d-i}$
  3. $\text{a-iv; b-iii; c-ii; d-ii}$
  4. $\text{a-iv; b-iii; ci; d-ii}$
edited by

1 Answer

Best answer
2 votes
2 votes

Answer B)

Automatic storage class- scope local to block. Outside the the value will never exists

Register storage class  - The register storage class is used to define local variables that should be stored in a register instead of RAM

Static storage class- These have memory allocated during program run and that survives till program ends. The scope of the variable -- where we can access it - is the block in which it is declared or if it is declared in global space - is restricted to that compilation unit (this differentiates it from global variables which can be used even in other compilation units). For example, in an OOP environment, consider a banking system. Now I can make the amount of money in the bank as a static variable as this is modified by any of the ACCOUNT objects but overall we have a single balance amount for the bank.  

External storage class- The extern storage class is used to give a reference of a global variable that is defined in some other compilation unit. 

edited by
Answer:

Related questions

0 votes
0 votes
1 answer
1
makhdoom ghaya asked Jul 1, 2016
2,265 views
While (87) printf(“computer”); The above $C$ statement will print “computer” $87$ timesprint “computer” $0$ timesprint “computer” $1$ times print “compu...
0 votes
0 votes
1 answer
2
makhdoom ghaya asked Jul 1, 2016
1,541 views
When we pass an array as an argument to a function, what actually gets passed ? Address of the array Values of the elements of the array Base address of the arrayNumber o...
1 votes
1 votes
3 answers
3
0 votes
0 votes
2 answers
4
makhdoom ghaya asked Jul 1, 2016
3,366 views
Match the following $:$$\begin{array} {cIcI} & \textbf{List – I} && \textbf{List – II} \\ \text{a.} & \text{DDL} & \text{i.} & \text{LOCK TABLE} \\ \text{b.} & \tex...