...
NTA UGC NET DEC-2022 Paper-2
May 24, 2024
Question 1428 – Algorithms
May 25, 2024
NTA UGC NET DEC-2022 Paper-2
May 24, 2024
Question 1428 – Algorithms
May 25, 2024

UGC NET CS 2006 June-Paper-2

Question 12
A static variable is one :
A
Which cannot be initialized
B
Which is initialized once at the commencement of execution and cannot be changed at runtime
C
Which retains its value throughout the life of the program
D
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.

Leave a Reply

Your email address will not be published. Required fields are marked *