Explore topic-wise MCQs in Technical MCQs.

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

1.

Variable names beginning with underscore is not encouraged. Why?

A. It is not standardized
B. To avoid conflicts since assemblers and loaders use such names
C. To avoid conflicts since library routines use such names
D. To avoid conflicts with environment variables of an operating system
E.
Answer» D. To avoid conflicts with environment variables of an operating system
2.

void main(){       int i=5;       i = !i>10;       printf("%d", i); }
39.The format identifier %i is also used for _____ data type?

A. char
B. int
C. float
D. double
Answer» C. float
3.

        void main(){      int c = - -14;       printf("%d", c); }
38.What is the output of this program?

A. 5
B. 10
C. 0
D. None of the above
Answer» D. None of the above
4.

void main(){      int i=0, j=1, k=2, m;      m = i++ || j++ || k++;      printf("%d %d %d %d", m, i, j, k);}
37.What is the output of this program?

A. 13
B. 14
C. -14
D. Compilation Error
Answer» C. -14
5.

#include <stdio.h>int main(){    printf("%d	",sizeof(5.5));    printf("%d	",sizeof(50000));    printf("%d",sizeof('A'));     return 0;  }
36.What is the output of this program?

A. 1 1 2 3
B. 1 1 2 2
C. 0 1 2 2
D. 0 1 2 3
Answer» C. 0 1 2 2
6.

#include <stdio.h>int main(){    extern int i;    i = 20;    printf("%d", sizeof(i));    return 0;}
35.What will be output when you will execute following c code?

A. 4 2 1
B. 8 4 4
C. 8 4 2
D. compiler dependent
Answer» E.
7.

int main(){float x = 'a';printf("%f", x);return 0;}
33.How would you round off a value from 6.66 to 7.0?

A. ceil(6.66)
B. floor(6.66)
C. roundup(6.66)
D. roundto(6.66)
Answer» B. floor(6.66)
8.

int main(){char ch;ch = 128;printf("%d", ch);return 0;}
32.What is the output of this program?

A. a
B. 0.000000
C. 97.000000
D. Run time error
Answer» D. Run time error
9.

#include <stdio.h>int main(){   signed a;	unsigned b;	a = 6u + -16 + 16u + -6;	b = a + 1;	if(a == b)	printf("%d %d",a,b);	else	printf("%u %u",a, b);    return 0;}
30.By default a real number is treated as a

A. float
B. double
C. long double
D. far double
E.
Answer» C. long double
10.

#include <stdio.h>int main(){    printf("%d	",sizeof(2.5));	printf("%d	",sizeof(2));	printf("%d",sizeof('A'));	return 0;}
29.What is the output of this program?

A. Compilation error
B. 1 0
C. 0 0
D. 0 1
Answer» E.
11.

The precedence of arithmetic operators is (from highest to lowest)?

A. %, *, /, +, -
B. %, +, /, *, -
C. %, +, -, *, /
D. +, -, %, *, /
Answer» B. %, +, /, *, -
12.

Which of the following is not a valid declaration in C?1. short int x;ÂÂÂÂ2. signed short x;3. short x;4. unsigned short x;

A. 1 and 2
B. 2 and 4
C. 3 and 4
D. All are valid
Answer» E.