in Programming in C recategorized by
4,775 views
0 votes
0 votes

Which one of the following describes correctly a static variable?

  1. It cannot be initialized
  2. It is initialized once at the commencement of execution and cannot be changed at run time
  3. It retains its value during the life of the program
  4. None of the above
in Programming in C recategorized by
4.8k views

2 Answers

0 votes
0 votes

The correct option is C.

It can be initialized at compile time itself.

It can be changed at runtime.

It retains its value during the life of the program, and most importantly a unique value is retained throughout the program.

0 votes
0 votes

It retains its value during the life of the program

Related questions