Zensar Previous Years Solved Sample Placement Papers
- Spot is bigger than King and smaller than Sugar.
Ralph is smaller than Sugar and bigger than Spot.
King is bigger than Ralph.
If the first two statements are true, the third statement is
a. true.
b. false.
c. uncertain.
Answer: b. false. - Pick out the odd in the following—
(A) Ashok—Assam
(B) Poonam—Punjab
(C) Gyanendra—Gujarat
(D) Anjana—Rajasthan
Answer: (D) Anjana—Rajasthan - KEATS = 25, SHELLEY = 35, BROWNING = ?
(A) 45
(B) 37
(C) 50
(D) 40
Answer: (D) 40 -
QUESTION: 81, 9, 64, ______, 49, 7
A: 8
B: 9
C: 10
D: 11
Ans: A -
QUESTION: AGMS, agms, _______________
A: ABCD abcd
B: abcd ABCD
C: BHNT bhnt
D: bhnt BHNT
Ans: D -
QUESTION: aa, bbb, cccc, ______________
A: ddd
B: ddddd
C: dddd
D: DDDD
Ans: C -
Would the following program compile?
main()
{
int a=10, *j;
void *k;
j = k = &a;
j++;
k++;
printf("\n%u%u", j, k);
}A. Yes
B. No, the format is incorrect
C. No, the arithmetic operation is not permitted on void pointers Answer: Option C
D. No, the arithmetic operation is not permitted on pointers
-
According to ANSI specifications, which is the correct way of declaring
main()
when it receives command line arguments?
A.
main(int argc, char *argv[])
Answer: Option AB.
main(argc, argv) int argc; char *argv[];
C.
main() {int argc; char *argv[]; }
D. None of the above
-
What error would the following function give on compilation?
f(int a, int b)
{
int a;
a = 20;
return a;
}A. missing parenthesis in the return statement
B. The function should be declared as
int f(int a, int b)
C. redeclaration of
a
Answer: Option CD. None of the above
-
Point out the error in the following program:
main()
{
const char *fun();
*fun() = 'A';
}
const char *fun()
{
return "Hello";
}Ans: fun() returns to a "const char" pointer which cannot be modified.
-
Which of the following is an infix expression?
a) (a+b)*(c+d)
b) ab+c*
c) +ab
d) abc+*
Answer: a
Explanation: (a+b)*(c+d) is an infix expression. +ab is a prefix expression and ab+c* is a postfix expression.
-
What is the time complexity of an infix to postfix conversion algorithm?
a) O(N log N)
b) O(N)
c) O(N²)
d) O(M log N)
Answer: b
Explanation: The time complexity of an infix to postfix expression conversion algorithm is mathematically found to be O(N).