Explore topic-wise MCQs in Expressions.

This section includes 107 Mcqs, each offering curated multiple-choice questions to sharpen your Expressions knowledge and support exam preparation. Choose a topic below to get started.

101.

extern int s; int t; static int u; main() { } Which of s, t and u are available to a function present in another file?

A. Only s
B. S & u
C. S, t, u
D. None
Answer» B. S & u
102.

Which is not a storage class?

A. Auto
B. Struct
C. Typedef
D. Static
Answer» C. Typedef
103.

Longevity of a variable refers to

A. The duration for which the variable retains a given value during the execution of a program.
B. The portion of a program in which the variable may be visible.
C. Internal linkage of a variable.
D. External linkage of a variable.
Answer» B. The portion of a program in which the variable may be visible.
104.

p++ executes faster than p + 1 since

A. P uses registers
B. Single machine instruction required for p++
C. Option a and b
D. None
Answer» C. Option a and b
105.

What is the value of the following expression? i = 1; i < < 1>

A. 2
B. -2
C. 1
D. -1
Answer» B. -2
106.

What will be the storage class of variable I in the code written below? #include< stdio> int main() { int I = 10; printf( %d , i); return 0; }

A. Automatic storage class
B. Extern storage class
C. Static storage class
D. Register storage class
Answer» B. Extern storage class
107.

What will be the output of the following program? #include< stdio> Void f(static int*, extern int); Static int b = 12; Int main() { Static int a[5]; Register int I; For(I = 0; I < 2> A[i++] = 2 * i++; F(a, b); For(I = 0; I < 2> Printf( %d , b++); Return 0; } Void f (static int *x, extern int y) { Register int I; For(I = 0; I < 2> *(++x +1) + = 2; Y + = 2; }

A. 0 0
B. 0 6
C. 0 12
D. 12 12
Answer» D. 12 12