# Unisys Written Test 2011

Posted on :07-03-2016

Aptitude:

Q1. Three pipes A, B, & C are attached to a tank. A & B can fill it in 20 & 30 minutes respectively while C can empty it in 15 minutes. If A, B & C are kept open successively for 1 minute each, how soon will the tank be filled?

ANS: 167 minutes.

Q2. A girl bringing eggs from shop in a basket. It fell down and all eggs broken. She did not remember, how many eggs in basket. But when counted at shop if they counted 2s, 3s, 4s and 5s remainders are 1, 2, 3, 4. Then find the number of eggs in basket.

ANS: 59

Q3. A school has 4 Maths, 3 Physics and 3 Chemistry teachers. Each teacher can teach 2 subjects maximum. What is the minimum number of teachers required?

Q4. Three persons named Tommy, Bacott, Roy are there. One of them is thief. Police caught them asked them who stole some thing. Then each person said those two stole it, I did not take it. Then later police found that Tommy is lying. Then who is the thief?

ANS: Tommy

Q5. There is a circle of radius 5. What is the area of the biggest rectangle that can be cut out of this circle?

Q6. A person walking 5/6 of his usual rate is 40 minutes late. What is his usual time?

ANS: 3 hours 20 minutes.

Technical:

Q7. What is the output for the following?

#define MAN(x,y) (x)>(y)?(x):(y)
{int i=10;
j=5;
k=0;
k=MAX(i++,++j);
printf(%d %d %d %d,i,j,k);
}

ANS: 10 5 0

Q8. What is the output for the following?

void main()
{
int i=7;
printf(%d,i++*i++);
}

ANS: 56

Q9. Find the output for the following C program

main()
{
int x=20,y=35;
x = y++ + x++;
y = ++y + ++x;
printf(%d %d ,x,y);
}

ANS: 57 94

Q10. Find the output for the following C program

main()
{
int x=5;
printf(%d %d %d ,x,x<<2,x>>2);
}

ANS: 5 20 1

Q11. Find the output for the following C program

#define swap1(a,b) a=a+b;b=a-b;a=a-b;
main()
{
int x=5,y=10;
swap1(x,y);
printf(%d %d ,x,y);
swap2(x,y);
printf(%d %d ,x,y);
}
int swap2(int a,int b)
{
int temp;
temp=a;
b=a;
a=temp;
return;
}

ANS: 10 5

Q12. What is the output for the following?

void main()
{
int const * p=5;
printf(%d,++(*p));
}

ANS: Compiler error: Cannot modify a constant value.

Q13. What is the output for the following?

main()
{
float me = 1.1;
double you = 1.1;
if(me==you)
printf(I love U);
else
printf(I hate U);
}

ANS: I hate U

Q14. What is the output for the following?

main()
{
static int var = 5;
printf(%d ,var-);
if(var)
main();
}

ANS: 5 4 3 2 1

## Related Companies

Accenture
Cognizant
Infosys
TCS
Wipro
HP
Emphasis
L & T Infotech
IGate

FreshersLive - No.1 Job site in India. Here you can find latest 2018 government as well as private job recruitment notifications for different posts vacancies in India. Get top company jobs for both fresher and experienced. Job Seekers can get useful interview tips, resume services & interview Question and answer. Practice online test free which is helpful for interview preparation. Register with us to get latest employment news/rojgar samachar notifications. Also get latest free govt and other sarkari naukri job alerts daily through E-mail.

 ✖