Synopsis Previous Years Solved Sample Placement Papers
- A sequence of numbers is: 2, 5, 8, 11. Assuming it follows the same pattern, what would be the value of the 20th number?
a) 50
b) 55
c) 59
d) 60
- Tommy's and Sara's current ages are represented by t and s, respectively. If in five years, Tommy will be twice as old as Sara, which of the following represents t in terms of s?
a) t = s + 5
b) t = 2s - 5
c) t = 2s + 5
d) t = s + 10
-
QUESTION: ACF acf G_______
A: IL gil
B: JL gil
C: IL gjl
D: LL gli
Ans: A -
What would be the output of the following program?
main()
{
const int x = 5;
int *ptrx;
ptrx = &x;
*ptrx = 10;
printf("%d", x);
}A. 5 Answer: Option A
B. 10
C. Error
D. Garbage value
-
A switch statement cannot include:
A. constants as arguments
B. constant expression as arguments
C. string as an argument Answer: Option C
D. None of the above
-
How long will the following program run?
main()
{
printf("\nSonata Software");
main();
}A. infinite loop
B. until the stack overflows Answer: Option B
C. All of the above
D. None of the above
-
On combining the following statements, you will get
char *p; p = malloc(100);
:
A.
char *p = malloc(100);
B.
p = (char*) malloc(100);
C. All of the above Answer: Option C
D. None of the above
-
What is the output of the following program?
main()
{
int n = 5;
printf("\nn = %*d", n, n);
}A. n=5
B. n=5
C. n= 5 Answer: Option C
D. error