C MCQ Set 1
C MCQ Set 1
a) 2 bytes
b) 4 bytes
c) 8 bytes
d) Depends on compiler
a) _sum
b) 2data
c) data_2
d) totalAmount
a) 2.5
b) 2
c) 3
d) Compilation error
a) :
b) ?
c) if
d) ?:
b) volatile
c) static
d) const
a) for
b) while
c) do-while
d) None
7. How many times will the loop run? `for(i=0; i<5; i++)`
a) 4
b) 5
c) 6
d) Infinite
a) int ptr
b) int *ptr
c) int &ptr
d) pointer int
a) strlen()
b) strlength()
c) size()
d) length()
a) stdlib.h
b) string.h
c) stdio.h
d) conio.h
a) 2
b) 4
c) 1
d) Depends on system
a) Quick sort
b) Bubble sort
c) Merge sort
d) Heap sort
b) Stop loop
c) Exit program
d) Continue loop
b) input()
c) cin
d) scanf("%s", str)
a) 4
b) 8
c) 6
d) Error
a) +
b) ++
c) =
d) &&
a) struct student {}
b) struct student();
c) structure student{}
d) class student{}
a) OR
b) NOT
c) Address of
d) AND
b) Looping function
d) None
a) fopen()
b) openfile()
c) create()
d) fileopen()
a) auto
b) register
c) volatile
d) static
a) 5
b) 8
c) 3
d) 0
b) 1
c) 0
d) Error
a) &
b) &&
c) |
d) ||
a) int a(10);
b) int[10] a;
c) int a[10];