# Huawei Placement paper 2011

Posted on :15-02-2016
C question:

Q1. What is o/p

#?include?
int main()
{
int x=10,y=10,z=5;
int a=x
printf("%d",a);
return 0;
}

Q2. What is the Output?

#include
int main()
{
int a=011|0x10;
printf("%d",a);
return 0;
}

Q3. What is the Output?

#include
?#?define? call(x,y)x#?#?y?
main()
{
int x=10,y=20,xy=20
printf("%d",xy+call(x,y));
}

Q4. What is the Output?

#include
main()
{
int a={5};
printf("%d%d%d%",a,a,a);
return 0;
}

Q5. What is the Output?

#include
main()
{
char a,b,c;
printf("%d",scanf("%c%c%c",&a,&b,&c));
}
input are A B C

Q1. The distance b/w 2 places is 1000 miles and a man has a camel which eats an apple/mile. He has 3000 apples and want to transport from one to another. Camel can take 1000 apples at a time. when reaching the destination how many apples will be with him?

Q2. How many 3-digit numbers will be there which are divisible by 19?

Q3. How many 3-digit numbers with at least one 5 in their digits?

Q4. Find the next term 0, 6, 24, 120, -

ANS: 210; each term is obtained by adding multiples of 6 with series 1,3,6,10,15

Q5. There is 12 pearls. One of them is either light or heavy than others. There is a weighing pan. How many trials are needed to find the exceptional one.

Q6. There is a work which can be completed by A with 12 days and B by 18 days. A and B works together for 3 days and B left. After that how many days for A to complete the work?

ANS7 days

Q7. 1992 Feb have 5 Sundays. In which year, the month Feb have 5 Sundays next?

Q8. There are 2 pots each filled with water and milk respectively. Some amount of milk is poured into water pot and then the some amount of mixture in water pot is poured into milk pot. which is true?

a. the amount of milk in water pot is greater than the amount of water in milk pot.
b. the amount of milk in water pot is less than the amount of water in milk pot.
c. the amount of water in milk pot is same as that of amount of milk in water pot.
d. cannot be determined.

ANS: C

Q9. In a party there are women and cats. There are 18 heads and 72 legs altogether. How many women and cats?

Q10. The sum of 25 consecutive integers (including negative, positive and zero) is divisible by

a. 5
b. 10
c. 25

Q11. The headquarters of Huawei is at

a. Honkong
b. Shenzan
c. Shanghai

Q12. In olden times man used to avoid attacks of Dinosour

a. using fire
b. Climbing the tree
c. Using weapons
d. None of the above

Q13. There is a population of N numbers and each person in the population shakehands with every other person. Which is true?

a. If N is even, even no of shakehands
b. if N is even, odd no of shakehands
c. if N is odd, even no of shakehands
d. if N is odd, odd no of shakehands

Q14.. Which is true?
out of 4 options ans is "& operator cannot be applied to register
variables"

Q15. How many additions are done in this program

for(i=0;i<31;i++)
for(j=0;j<31;j++)
for(k=0;k<31;k++)
d=d+1;

Q16. what is the output?

i=6720,j=4;
for(;i%j==0;){
i=i/j;
;
j=j+1;
}
print i;

Q17. What is a bit=field?

Q18. Storage class defines

a. scope
b. scope and permenance
c. permeance

Q19. What is the Output?

main(){
int x=0;
fun(x);
print x;
}
fun(int x){
x=x+1;
print x;
}

Q20. Changing some of the bits to a desired pattern is known as

Q21.

main{
int i=1;
{
int i=2;
print i;
i=i+1;
}
print i;
}
What is the output?

Q22. Standard error stream stderr,

ANS: are by default buffered

Q23. Named pipes are ansd:strictly unidirectional, even on systems where anonymous pipes are bidirectional ( full-duplex).

Q24. Proto type of printf

ANS: int fprintf(FILE *stream, const char *format, ...)

Q25. User level switching is faster than the kernel level s/w

ANS: Since a trap to kernel is not required(user level thread is not known by the os)

Q26. Automatic variables are stored in

Q27. Dynamic memory is it allocated from heap/stack...?

Q28. How to find the size of file in unix

Q29. How many times is the for loop executed

for(i=0;i<10;i++);

a. 1
b. 10
c. compiler error
d. not executed

Q30. How many times is the for loop executed

for(i=0;i<10;i++);

a. 1
b. 10
c. compiler error
d. not executed

Q31. For selection, we use

a . if..else
b .for loop
c. while loop

Q32. Which of the following is executed 1rst?

i .&& ii.|| iii.!
a. i
b. ii
c. iii
d. all are equal

Q33.To find o/p of a recursive program, function where in parameters are passed by value, reference......function used in
ansi computers to clear the screen is:

a. clrsc
b. clear
c. clescr
d. none of the above

Q34. Some students are standing in a circle in which 6th and the 16th student are standing opposite to each other. find how many students were present there.

Q35. Two cube intersect then which of the following is never made:

a) rectangle
b) triangle
c) cube
d) none of these

Q36. Average of 9 numbers is M, avg of 3 nos is N, avg of rest of the nos is P,then what is the equation formed.

Q37. A ladder was rested along a wall of height 5m. If ladder slides 2m away from the wall then ladder touches the foot of the wall. What is the height of the ladder.

Q38. A boy gets some rupees from his mother and spends them on 5 stores. He spends one rupee more than half of the money. How much money he had at the time of entering the shop.

Q39. 311311311311311311 is divisible by:

a) 3 and 11.
b) 11 but not 3.
c) 3 but not 11.
d) none of the above.

Q40. If a rainy day occurs on every 10th day and each rainy day accounts for half rainbow then in 20 days what is the percentage of days when rainbow doesnt takes place.

Q41. A man works continuosly for 8 days and then takes rest on the 9th day. If he starts on monday then on which day he will take 12th rest.

Q42. Its 27 min past 10. How many minutes would it take to cover 12 noon.

Q43. In a transistor in active region there is a relation:

a) IB = BIC
b) IC = BIB
c) IC = IB
d) none of these.

Q44. For preservation of food we need

a) salt
b) formaldehyde
c) sugar
d) none of these

Q45. What is dry ice.

Q46. Ammeter 25-0-25 mA then what is the sensitivity of ammeter.

Q47. Which layer is not in OSI layer:

a) physical
c) network
d) transmission

Q48. If carrier is modulated 100 % then what is the percentage increment of power:

a) 50
b) 100
c) 0
d) none

Q49. Convert (17)10 to binary.

Q50. (375)10 = ()8

Q51. During a day at which time most distortion takes place.

## Related Companies

Accenture
Syntel
HP
Samsung
Microsoft
Honeywell
Dell
Philips
TVS Motor

FreshersLive - No.1 Job site in India. Here you can find latest 2020 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.

 ✖