Is initialization mandatory for local static variables?
1.Yes
2.No
3.Depends on the compiler
4.Depends on the standard
Posted Date:-2022-03-21 12:17:10
What linkage does automatic variables have?
1. Internal linkage
2.External linkage
3.No linkage
4.None of the mentioned
Posted Date:-2022-03-21 09:37:54
Array sizes are optional during array declaration by using ______ keyword.
1.auto
2.static
3.extern
4.register
Posted Date:-2022-03-21 11:58:11
Assignment statements assigning value to local static variables are executed only once?
1.true
2.False
3.Depends on the code
4.None of the mentioned
Posted Date:-2022-03-21 12:13:47
Automatic variables are allocated memory in?
1. heap
2.Data segment
3.Code segment
4.stack
Posted Date:-2022-03-21 10:12:59
Automatic variables are initialized to?
1.0
2.Junk value
3.Nothing
4.Both (a) & (b)
Posted Date:-2022-03-21 11:34:38
Automatic variables are variables that are?
1.Declared within the scope of a block, usually a function
2.Declared outside all functions
3.Declared with auto keyword
4.Declared within the keyword extern
Posted Date:-2022-03-21 09:39:33
Automatic variables:
1.Exist only within that scope in which it is declared
2.Cease to exist after the block is exited
3. Both (a) & (b)
4.Only 1
Posted Date:-2022-03-21 10:12:05
Functions have static qualifier for its declaration by default.
1.True
2.False
3.Depends on the compiler
4.Depends on the standard
Posted Date:-2022-03-21 12:15:14
The variable declaration with no storage class specified is by default:
1.auto
2.extern
3.static
4.register
Posted Date:-2022-03-21 11:45:25
What is the format identifier for "static a = 20.5;Â?
1.%s
2. %d
3.%f
4. Illegal declaration due to absence of data type
Posted Date:-2022-03-21 12:14:29
What is the output of this C code? int x = 5; void main() { int x = 3; m(); printf("%d", x); } void m() { x = 8; n(); } void n() { printf("%d", x); }
1.8 3
2.8 5
3.3 8
4. 5 3
Posted Date:-2022-03-21 12:00:13
What is the output of this C code? int x = 5; void main() { int x = 3; printf("%d", x); { x = 4; } printf("%d", x); }
1.Run time error
2.3 3
3.3 5
4.3 4
Posted Date:-2022-03-21 11:48:03
What is the output of this C code? static int x; void main() { int x; printf("x is %d", x); }
1.0
2.Junk value
3.Run time error
4.Nothing
Posted Date:-2022-03-21 12:02:41
What is the output of this C code? void main() { int x = 3; { x = 4; printf("%d", x); } }
1.4
2.3
3.0
4.Undefined
Posted Date:-2022-03-21 11:58:56
What is the output of this C code? void main() { int x; } here x is?
1. automatic variable
2.static variable
3.global variable
4.register variable
Posted Date:-2022-03-21 10:14:34
What is the output of this C code? void main() { static int x; if (x++ < 2) main(); }
1. Infinite calls to main
2.Run time error
3.Varies
4.main is called twice
Posted Date:-2022-03-21 12:04:38
What is the scope of a function?
1.Whole source file in which it is defined
2.From the point of declaration to the end of the file in which it is defined
3.Any source file in a program
4. From the point of declaration to the end of the file being compiled
Posted Date:-2022-03-21 11:56:31
What is the scope of an external variable?
1.Whole source file in which it is definedB.
2. From the point of declaration to the end of the file in which it is defined
3.Any source file in a program
4.From the point of declaration to the end of the file being compiled
Posted Date:-2022-03-21 11:49:34
Which of the following is true for static variable?
1. It can be called from another function
2.It exists even after the function ends.
3. It can be modified in another function by sending it as a parameter.
4.All of the mentioned
Posted Date:-2022-03-21 12:05:47
Which variable has the longest scope? int b; int main() { int c; return 0; } int a;
1.a
2.b
3.c
4.Both (a) and (b)
Posted Date:-2022-03-21 11:57:16