NTA UGC NET DEC-2022 Paper-2
May 24, 2024Question 1428 – Algorithms
May 25, 2024UGC NET CS 2006 June-Paper-2
|
Question 12
|
A static variable is one :
|
Which cannot be initialized
|
|
|
Which is initialized once at the commencement of execution and cannot be changed at runtime
|
|
|
Which retains its value throughout the life of the program
|
|
|
Which is the same as an automatic variable but is placed at the head of a program
|
Question 12 Explanation:
A static variable is one which retains its value throughout the life of the program. The static storage class instructs the compiler to keep a local variable in existence during the life-time of the program instead of creating and destroying it each time it comes into and goes out of scope.
Correct Answer: C
Question 12 Explanation:
A static variable is one which retains its value throughout the life of the program. The static storage class instructs the compiler to keep a local variable in existence during the life-time of the program instead of creating and destroying it each time it comes into and goes out of scope.
