You are on page 1of 5

MSC 2k12 PLACEMENT PREPARATION SELF MOCK

Round -1 (Aptitude Test)

Time 25min

Date :

24/11/2014

1 . Two trains are running in opposite directions with the same speed. If the length of
each train is 120 metres and

they cross each other in 12 seconds, then the speed of

each train (in km/hr) is :


a) 10

b) 18

b) 36

d) 72

2. In a dairy farm, 40 cows eat 40 bags of husk in 40 days. In how many days one cow
will eat one bag of husk?
a) 1

b) 1/40

c) 40

d) 80

3. The average age of husband, wife and their child 3 years ago was 27 years and that of
wife and the child 5 years ago

was 20 years. The present age of the husband is:

a) 35 years

b) 40 years

b) 50 years

d) none of these

4. 4 men and 6 women can complete a work in 8 days, while 3 men and 7 women can
complete it in 10 days. In how many days will 10 women complete it?
a) 35

b) 40

b) 45

d) 50

5. A man walked diagonally across a square lot. Approximately, what was the percent
saved by not walking along the edges
a) 20

b) 24

b) 30

d) 33

6. What was the day of the week on 18th April, 1994?


a)

7. How many times a day , the clocks of the hand are straight in a day ?
a)22

b)24

c) 44

d)48

8 . A speaks truth in 75% cases and B speaks truth in 80% of cases. In what percentage of
cases are they likely to contradict each other on narrating a incident?
A. 5%

B. 15%

C. 35%

D.45%

9. #include<stdio.h>
#define str(x) #x
#define Xstr(x) str(x)
#define oper multiply
int main() {
char *opername = Xstr(oper);
printf("%s\n", opername);
return 0;
}
A. Error: in macro substitution

B. Error: invalid reference

'x' in macro
C.

Print multiply

10 . Find the Output.


#include<stdio.h>
int fun(int, int);
typedef int (*pf) (int, int);
int proc(pf, int, int);
int main()
{
printf("%d\n", proc(fun, 6, 6));
return 0;
}
int fun(int a, int b)
{

D. No Output

return (a==b);
}
int proc(pf p, int a, int b)
{
return ((*p)(a, b));
}
[A]. 6

[B]. 1

[C]. 0

[D]. -1

11 .
What will be the output of the program assuming that the array begins at the location
1002 and size of an integer is 4 bytes?
#include<stdio.h>
int main()
{
int a[3][4] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 };
printf("%u, %u, %u\n", a[0]+1, *(a[0]+1), *(*(a+0)+1));
return 0;
}
A . 448,4,4

B. 520,2,2

C . 1006,2,2

D. Error

12. Determine the output

void main() {
int i =5;
printf(%d,i++ + ++i);
}
A. 10

B.11

C. 12

D.13

13.
You have 5 jars of pills. Each pill weighs 10 gram, except for contaminated pills
contained in one jar, where each pill weighs 9 gm. Given a balancing scale, how could
you tell which jar had the contaminated pills in minimum number of measurements?
14. The prefix form of an infix expression A+B-C*D is
(A) +AB-*CD.

(B) -+A B C * D.

(C) -+A B * C D.

(D) - + *ABCD.

15.Assuming the integer is 2 bytes, find the output


#include<stdio.h>
int main() {
printf("%x\n", -2<<2);
return 0;
}

16 . Find output
#include<stdio.h>
int main()
{
int i=4, j=8;
printf("%d, %d, %d\n", i|j&j|i, i|j&j|i, i^j);
return 0;
}
A. 12,12,12

B.112,1,12

C. 32,1,12

D. -63,1,12

17 . #define P printf("%d\n", -1^~0);


#define M(P) int main()\
{\
P\
return 0;\
}
M(P)
A.1

B. 0

C. -1

D. 2

18 . #include<stdio.h>
int main()

{
int i;
char a[] = "\0";
if(printf("%s", a))
printf("The string is empty\n");
else
printf("The string is not empty\n");
return 0;
}
A. The string is empty

B. The string is not empty

C. No output

D. 0

19 . Write a algo to swap two numbers without using temp variable


20 . Write a program to print sum of two numbers without using semicolon .

You might also like