Aztec Previous Years Solved Sample Placement Papers
-
What is the purpose of fflush() function?
(a) Flushes all streams and specified streams (Ans)
(b) Flushes only specified stream
(c) Flushes input/output buffer
(d) Flushes file buffer
-
Point out the error, if any, in the program.
```c
#include
int main() { int a = 10; switch(a) { } printf("This is C program."); return 0; } ``` (a) Error: No case statement specified
(b) Error: No default specified
(c) No Error (Ans)
(d) Error: Infinite loop occurs
-
What will be the output of the program?
```c
#include
int addmult(int ii, int jj) { int kk, ll; kk = ii + jj; ll = ii * jj; return (kk, ll); } int main() { int i=3, j=4, k, l; k = addmult(i, j); l = addmult(i, j); printf("%d, %d\n", k, l); return 0; } ``` (a) 12, 12 (Ans)
(b) 7, 7
(c) 7, 12
(d) 12, 7
-
In C, if you pass an array as an argument to a function, what actually gets passed?
(a) Value of elements in array
(b) First element of the array
(c) Base address of the array (Ans)
(d) Address of the last element of array
-
Out of fgets() and gets(), which function is safe to use?
(a) gets()
(b) fgets() (Ans)
-
In the following code, what is 'P'?
```c
typedef char *charp;
const charp P;
```
(a) P is a constant (Ans)
(b) P is a character constant
(c) P is character type
(d) None of the above
-
1/3 of a number is 3 more than 1/6 of the same number. What is the number?
(a) 18 (Ans)
(b) 21
(c) 12
(d) 6
-
In the min-max game, Alok and Bhanu play optimally with N = 12 + X*(Y-Z). What is the final value of N?
(a) 93
(b) 12 (Ans)
(c) -69
(d) 30
-
Bernard's walking speed can be calculated using the formula n/P = 144. If Bernard's pacelength is 164 cm, what is his walking speed in km/hr?
(a) 23.62 (Ans)
(b) 8.78
(c) 11.39
(d) 236.16
-
There are two boxes, one with 10 red balls and the other with 10 green balls. After rearranging, what is the maximum probability of drawing a red ball?
(a) 3/4
(b) 37/38
(c) 1/2
(d) 14/19 (Ans)