300+ TOP C PROGRAMMING Multiple Choice Questions and Answers
300+ TOP C PROGRAMMING Multiple Choice Questions and Answers
Go To Facebook
Create A Pro*le Now
Facebook®
Facebook®
Sign Up
Answers
Facebook®
Facebook®
Facebook®
Go To Facebook
Create A Pro*le Now
Sign Up
Zenith Bank
Open
Zenith Bank
Open
Zenith Bank
Open
Zenith Bank
Open
20. main()
{
struct
{
int i;
}xyz;
(*xyz)->i=10;
printf(“%d”,xyz.i);
}
What is the output of this program?
A. program will not compile
B. 10
C. god only knows
D. address of I
Answer: B
Zenith Bank
Open
24. #include
void func()
{
int x = 0;
static int y = 0;
x++; y++;
printf( “%d — %dn”, x, y );
}
int main()
{
func();
func();
return 0;
}
What will the code above print when it is executed?
A.
1—1
1—1
B.
1—1
2—1
C.
1—1
2—2
D.
1—1
1—2
Answer: D
27. int i = 4;
switch (i)
{
default: ;
case 3:
i += 5;
if ( i == 8)
{
i++;
if (i == 9) break;
i *= 2;
}
i -= 4;
break;
case 8:
i += 5;
break;
}
printf(“i = %dn”, i);
What will the output of the sample code above be?
A. i = 5
B. i = 8
C. i = 9
D. i = 10
Answer: A
void main(){
int huge*p=(int huge*)0XC0563331;
int huge*q=(int huge*)0xC2551341;
*p=200;
printf(“%d”,*q);
}
A.0
B.Garbage value
C.null
D. 200
E. Compiler error
Answer: D
Answer: D
95. In which tree, for every node the height of its left
subtree and right subtree differ almost by one?
A. Binary search tree
B. AVL tree
C. Threaded Binary Tree
D. Complete Binary Tree
Answer: B
D. Call by Name
Facebook® Sign Up
Answer: A
!
100. Which is the correct syntax to declare constant
pointer?
A. int *const constPtr;
B. *int constant constPtr;
C. const int *constPtr;
D. A and C both
Answer: D
------>>[MOST IMPORTANT]<<------
Comment *
Name *
Email *
Website
Post Comment
Post Comment