Home »» Placement Papers »» All Papers »» Huawei »» Placement Paper

### Huawei Placement Paper : 30212

Huawei some questions

1.Three ants are there in 3 corner of a triangle. They started moving randomly. What is the probability that they meet.

a:100%

b:50%

c:75%

d:25%

2.How many squares in a chess board?

a:64

b:128

c:204

d:206

3.A Ball is dropped from 8 m height.it rebounds to half the height when it hits the ground. What is the distance travelled by the ball before it hits the ground?

a:23

b:24

c:12

d:16

ans:a

4.what is the angle between hour and minute hand when the time is 7:20

a:100

b:110

c:90

d:80

C Aptitude questions

Find the output

1.void main()

{

int const * p=5;

printf("%d",++(*p));

}

2.void main()

{

float me = 2.1;

double you = 2.1;

if(me==you)

printf("equal");

else

printf("not equal");

}

3.#include

#define a 10

main()

{

#define a 20

printf("%d",a);

}

ans:20

4.main()

{

static int a = 5;

printf("%d ",a--);

if(a)

main();

}

ans:54321

5what are the different data types?

7.difference between array and linked list?

8.what is stack? What is heap?

9.what is volatile embedded c?

10write the output of programme

switch(1)

{

case 1:printf(“1”):

case 2:printf(“2”);

default:printf(“default”):

}

11.what is function?

12what is a process in OS?

14.what is size of int,and what are formatting types for int?

15.what is pointer?

16.what is the size of int *ptr and char *ptr?

17.standard error stream stderr,

ans: are by defaultbuffered

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

19 proto type of printf

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

20user level switcjing 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)

21automatic variables are stored in

22dynamic meory is it allocated from heap/satck...?

23how to find the size of file in unix

24How many times is the for loop executed

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

a.  1

b.  10

c.  compiler error

d.  not executed

25How many times is the for loop executed

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

a.  1

b.  10

c.  compiler error

d.  not executed

26for selection, we use

a  .if..else

b  .for loop

c.  while loop

27Which of the following is executed 1rst?

i .&& ii.|| iii.!

a.  i

b.  ii

c.  iii

d.  all are equal

28To find o/p of a recursive pgm, function where in parameters are passed by value,reference......function used in

computers to clear the screen is:

a.  clrsc

b.  clear

c.  clescr

d.  none of the above

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

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

a)rectangle

b)triangle

c)cube

d)none of these

31 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.

32A 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.

33  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.

34.  311311311311311311 is divisible by:

a)3 and 11.

b)11 but not 3.

c)3 but not 11.

d)none of the above.

35. 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 doesn't takes place.

36. A man works continuously 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.

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

38 In a transistor in active region there is a relation:

a) IB  = BIC

b) IC = BIB

c) IC = IB

d) none of these.

39For preservation of food we need

a) salt

b) formaldehyde

c) sugar

d) none of these

40what is dry ice.

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

42) Which layer is not in OSI layer:

a)physical

c)network

d)transmission

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

a)50

b)100

c)0

d)none

44 Convert (17)10 to binary.

45(375)10 = ()8

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

 Comment Tweet