Margdarshan Test 1 (Aptitude and C Language Test)

Is this your test? Login to manage it. If not, you can build a quiz just like it.

This is a non-interactive preview of the quiz content.

1.
1 point
Complete the series: S, M, T, W, T, ?
2.
1 point
Your friend has taught you the method of making a new cigarette using eight used cigarette stubs. You have 4 unopened packets of 16 cigarettes each. How many cigarettes can you smoke by making use of the above mentioned acquired knowledge?
3.
1 point
There is a change in IPL 2014 format. All 10 teams would play against one- another but only once. The top two teams would play the ‘best of three’ final. What are the maximum and minimum numbers of matches that may be played in the tournament?
4.
1 point
You have 9 oranges. All except one are of same weight. You also have a pan-balance. What is the minimum number of times that you have to use it to make out which orange is different in weight from others?
5.
1 point
Two trains are moving on the same track towards each other at the speeds of 54 and 36 km per hour. When they are 2.5 kilometers apart, a bird perched at the roof of one train starts flying towards the other, reaches it and then returns. Thus, these birds keep flying continuously from one train to the other without any break and at a speed of 18 km per hour till the two trains collide. What is the total distance travelled by the bird?
6.
1 point
What time between 9 and 10 would the minute and hour hand exactly coincide?
7.
1 point
How many alphabets in English (excluding Y ) have an exactly matching mirror image?
8.
1 point
A cube of 5cm side was painted in three colours such that the opposite faces had the same colour. Subsequently, it was cut into smaller cubes of side 1 cm each.
Answer the questions that follow (Question 8 to Question 15) based on this information.
How many smaller cubes were obtained?
9.
1 point
(Question No 8 Contd.)
How many smaller cubes had only one coloured face?
10.
1 point
(Question No 8 Contd.)
How many smaller cubes had two coloured faces?
11.
1 point
(Question No 8 Contd.)
How many smaller cubes had three coloured faces?
12.
1 point
(Question No 8 Contd.)
How many smaller cubes had no colour on any of the faces?
13.
1 point
(Question No 8 Contd.)
How many smaller cubes had four coloured faces?
14.
1 point
(Question No 8 Contd.)
How many smaller cubes had five coloured faces?
15.
1 point
(Question No 8 Contd.)
How many smaller cubes had six coloured faces?
16.
1 point
What is the output of the following program?

#include

void foo(int[][3]);

int main(void)
{
int a[3][3] = { {1, 2, 3}, {4, 5, 6}, {7, 8, 9} };

foo(a);
printf("%d\n", a[2][1]);

return 0;
}

void foo(int b[][3])
{
++b;
b[1][1] = 9;
}
17.
1 point
What is the output of the following program?

#include

int main(void)
{
int arr[5] = { 1, 2, 3, 4, 5 };
int *ptr = (int*)(&arr + 1);

printf("%d %d\n", *(arr + 1), *(ptr - 1));

return 0;
}
18.
1 point
What is the output of the following program?

#include

int main(void)
{
int a, b, c, d;
a = 3;
b = 5;
c = a, b;
d = (a, b);

printf("c=%d ", c);
printf("d=%d\n", d);

return 0;
}
19.
1 point
What is the output of the following program? (Assuming size of int is 4 bytes)

#include

int main(void)
{
int i = 3;
int j;

j = sizeof(++i + ++i);

printf("i=%d j=%d\n", i, j);

return 0;
}
20.
1 point
Assuming, integer is 2 byte, What will be the output of the program?

#include

int main()
{
printf("%x\n", -1>>1);
return 0;
}
21.
1 point
Which of the following statements are correct about the program?

#include

int main()
{
unsigned int num;
int i;
scanf("%u", &num);
for(i=0; i<16; i++)
{
printf("%d", (num< }
return 0;
}
22.
1 point
What is the output of the following program?

#include
#include

int ripple(int n, ...)
{
int i, j, k;
va_list p;

k = 0;
j = 1;
va_start(p, n);

for (; j < n; ++j)
{
i = va_arg(p, int);
for (; i; i &= i - 1)
++k;
}
va_end(p);
return k;
}

int main(void)
{
printf("%d\n", ripple(3, 5, 7));
return 0;
}
23.
1 point
What is the output of the following program?

#include
#define FOO(x, y) ((x)>(y)) ? (x):(y);

int main()
{
int i=10, j=5, k=0;
k = FOO(++i, j++);
printf("%d, %d, %d\n", i, j, k);
return 0;
}
24.
1 point
What is the output of the following program:

#include

int main()
{
printf(5+"Good Morning\n");
return 0;
}
25.
1 point
What is the output of the following program:

#include

int main()
{
char c=48;
int i, mask=01;
for(i=1; i<=5; i++)
{
printf("%c", c|mask);
mask = mask<<1;
}
return 0;
}