adplus-dvertising
frame-decoration

Question

A static variable

a.

cannot be initialized

b.

is initialized once at the commencement of execution and cannot be changed at run time

c.

retains its value throughout the file of the program

d.

is same as an automatic variable but is placed at the head of a program

Answer: (c).retains its value throughout the file of the program

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. A static variable

Similar Questions

Discover Related MCQs

Q. The statement
# include < math.h>
is written at the top of a program to indicate

Q. The declarations
typedef float hight [100];
height men, women;

Q. In case of ordinary int variables

Q. If a is an unsigned integer variable whose value is hx6db7, what is the value of -a?

Q. The C declaration
int b [100];
reserves ____________ successive memory locations,each large enough to contain single integer.

Q. The value of an automatic variable that is declared but not initialized will be

Q. Choose the correct answer

Q. Which of the following comments regarding the reading of a string, using scanf(with optional) and get is true?

Q. If integer needs two bytes of storage, then maximum value of a signed interger is

Q. The minimum number of temporary variables needed to swap the contents of two variables is

Q. If s and b are integers then  purpose of the following program fragment is to 

   b = s + b ;
   s = b - s ;
   b = b - s ;

Q. If integer needs two bytes of storage, then maximum value of a signed integer is

Q. printf ( "%d" , printf ( "tim" ) ):

Q. Consider the statements:

putchar ( getchar ( ));
putchar(getchar( ));

If
a
b
is the input, the output will be

Q. Literal means

Q. Which of the following are true regardless of the implementation ?

Q. Choose the correct statements

Q. Choose the correct statements

Q. Choose the correct statements

Q. Which of the following comments about wide characters is/are true ?