TRUE
FALSE
auto
dec
static
extern
Constant variables need not be defined as they are declared and can be defined later
Global constant variables are initialized to zero
const keyword is used to define constant values
You cannot reassign a value to a constant variable
register
What is the output of the following code?
8 6 4 2
Infinite output
6 4 2 0
Invalid because main function can’t call itself.
What will be the output of the following code segment?
10 10
11 11
11 12
12 12
What is the output of the following code segment?
a = 11 b = 21 a = 11 b = 21
a = 11 b = 21 a = 12 b = 21
a = 11 b = 21 a = 11 b = 22
a = 11 b = 21 a = 12 b = 22
outside the function
throughout the program
only in the function where it is defined
surrounding of that function
What is the output of this C code?
#include
void main()
{
static int x;
if (x++ < 2)
main();
}
Infinite calls to main
Run time error
Varies
main is called twice
Internal
External
Both Internal and External
None of the mentioned
Whole source file in which it is defined
From the point of declaration to the end of the file in which it is defined
Any source file in a program
From the point of declaration to the end of the file being compiled
int
long
float
All of the mentioned
Reading the value into a register variable
Copy the value from a memory variable
Global declaration of register variable
static register a;
register static a;
Both static register a; and register static a;
We cannot use static and register together