C and Ds MCQ Jeca 05.06.22
C and Ds MCQ Jeca 05.06.22
C and Ds MCQ Jeca 05.06.22
A binary search tree whose left subtree and right subtree differ in hight by
at most 1 unit is called ……
A. avl tree
B. red-black tree
C. lemma tree
D. none of the above
int main()
while(1)
printf("CppBuzz.com");
}
return 0;
(A) 1 time
(B) Compilation Error
(C) Infinite times
(D) Runtime Error
16.What is output of below program?
int main()
int i,j,count;
count=0;
for(j=0;j<5;j++);
count++;
printf("%d",count);
return 0;
A) 55
(B) 54
(C) 1
(D) 0
17.What is output of below program?
int main()
int i,j,k,count;
count=0;
for(i=0;i<5;i++)
for(j=0;j<5;j++)
count++;
printf("%d",count);
return 0;
}
(A) 5
(B) 10
(C) 25
(D) 50
int main()
int i;
printf("Hello");
return 0;
int main()
for(; ;);
for(; ;);
printf("Hello");
return 0;
int main()
for(; ;)
for(; ;)
printf("Hello..");
return 0;
int main()
char name[]="Cppbuz";
int len;
int size;
len = strlen(name);
size = size_of(name);
printf("%d,%d",len,size);
return 0;
(A) 6,6
(B) 6,7
(C) 7,7
(D) 0,0
(A) math.h
(B) mathio.h
(C) string.h
(D) ctype.h
24. Libray function getch() belongs to which header file?
(A) stdio.h
(B) conio.h
(C) stdlib.h
(D) stdlibio.h
int main()
int a = 10/3;
printf("%d",a);
return 0;
A) 3.33
(B) 3.0
(C) 3
(D) 0
(A) #include<stdio.h>
(B) return 0
(C) void main(int argc , char ** argv)
(D) None of above
{
int a = 10.5;
printf("%d",a);
return 0;
(A) 10.5
(B) 10
(C) 0
(D) Compilation Error
int a = 5;
int b = 10;
int c = a+b;
printf("%i",c);
(A) 0
(B) 15
(C) Undefined i
(D) Any other Compiler Error
29. Which compilation unit is responsible for adding header files content in the
source code?
(A) Linker
(B) Compiler
(C) Assembler
(D) Preprocessor
30. If the size of the array is less than the number of initializers then