Onmobile Previous Years Solved Sample Placement Papers
- The temperature on Monday was lower than on Tuesday. The temperature on Wednesday was lower than on Tuesday. The temperature on Monday was higher than on Wednesday. If the first two statements are true, the third statement is
a. true.
b. false.
c. uncertain.
Answer: a. true. - 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. - The hotel is two blocks east of the drugstore. The market is one block west of the hotel. The drugstore is west of the market. If the first two statements are true, the third statement is
a. true.
b. false.
c. uncertain.
Answer: a. true. - Tom puts on his socks before he puts on his shoes. He puts on his shirt before he puts on his jacket. Tom puts on his shoes before he puts on his shirt. If the first two statements are true, the third statement is
a. true.
b. false.
c. uncertain.
Answer: b. false. - Three pencils cost the same as two erasers. Four erasers cost the same as one ruler. Pencils are more expensive than rulers. If the first two statements are true, the third statement is
a. true.
b. false.
c. uncertain.
Answer: c. uncertain. -
How many times the while loop will get executed if a short int is 2 bytes wide?
A: Infinite times
B: 255 times
C: 256 times
D: 254 times
Ans: B -
How can you sort the elements of the array in descending order?
What will be the output of the program?
A: 2, 8
B: 4, 8
C: 2, 4
D: 4, 12
Ans: D -
Find the output of the following code?
Ans: A51ANvoid main() { void *ptr; char *a = 'A'; char *b = "TAN"; int i = 50; ptr = a; ptr = (*char)malloc(sizeof(a)); printf("%c", *ptr); ptr = i; ptr = (*int)malloc(sizeof(i)); printf("%d", ++(*ptr)); ptr = b; ptr = (*char)malloc(sizeof(b)); printf("%c", ++(*ptr)); }
-
What will be the output of the program if the array begins at 1200 in memory?
#include <stdio.h> int main() { int arr[] = {2, 3, 4, 1, 6}; printf("%u, %u, %u\n", arr, &arr[0], &arr); return 0; }
A: 1200, 1202, 1204
B: 1200, 1200, 1200
C: 1200, 1204, 1208
D: 1200, 1202, 1200
Ans: B