**HUAWEI ****APTITUDE QUESTIONS FOR PRACTICE**

1. A coffee shop blends 2 kinds of coffee,putting in 2 parts of a 33p. a gm. grade to 1 part of a 24p. a gm.If the mixture is changed to 1 part of the 33p. a gm. to 2 parts of the less expensive grade,how much will the shop save in blending 100 gms.

A.Rs.90

B.Rs.1.00

C.Rs.3.00

D.Rs.8.00

**Ans:C**

2. There are 200 questions on a 3 hr examination.Among these questions are 50 mathematics problems.It is suggested that twice as much time be spent on each maths problem as for each other question.How many minutes should be spent on mathematics problems

A.36

B.72

C.60

D.100

**Ans:B **

3 . Three types of tea the a,b,c costs Rs. 95/kg,100/kg and70/kg respectively. How many kgs of each should be blended to produce 100 kg of mixture worth Rs.90/kg, given that the quntities of band c are equal

a)70,15,15

b)50,25,25

c)60,20,20

d)40,30,30

**Ans: (b) **

4. What is the maximum number of half-pint bottles of cream that can be filled with a 4-gallon can of cream (2 pt. =1 qt. and 4 qt. =1 gal)

A.16

B.24

C.30

D.64

**Ans: D **

5. There are two circles, one circle is inscribed and another circle is circumscribed over a square. What is the ratio of area of inner to outer circle?

**Ans: 1 : 2 **

6. There are 12 boys and 15 girls, How many different dancing groups can be formed with 2 boys and 3 girls. 48Which of the following fractions is less than 1/3 ?

(a) 22/62

(b) 15/46

(c) 2/3

(d) 1

**Ans: (b) **

7. One of Mr. Horton,his wife,their son,and Mr. Horton’s mother is a doctor and another is a lawyer.

a)If the doctor is younger than the lawyer, then the doctor and the lawyer are not blood relatives.

b)If the doctor is a woman, then the doctor and the lawyer are blood relatives.

c)If the lawyer is a man, then the doctor is a man.

Whose occupation you know?

**Ans: Mr. Horton:he is the doctor. **

8. A person wants to buy 3 paise and 5 paise stamps costing exactly one rupee. If he buys which of the following number of stamps he won’t able to buy 3 paise stamps.

Ans: 9

9. Mr. and Mrs. Aye and Mr. and Mrs. Bee competed in a chess tournament.Of the three games played:

a)In only the first game werethe two players married to each other.

b)The men won two games and the women won one game.

c)The Ayes won more games than the Bees.

d)Anyone who lost game did not play the subsequent game.

Who did not lose a game?

**Ans:Mrs.Bee did not lose a game. **

10. Two cars are 15 kms apart. One is turning at a speed of 50kmph and the other at 40kmph . How much time will it take for the two cars to meet?

**Ans: 3/2 hours **

11. Three piles of chips–pile I consists one chip, pile II consists of chips, and pile III consists of three chips–are to be used in game played by

Anita and Brinda.The game requires:

a)That each player in turn take only one chip or all chips from just one pile.

b)That the player who has to take the last chip loses.

c)That Anita now have her turn.

From which pile should Anita draw in order to win?

**Ans:Pile II **

12. In a class composed of x girls and y boys what part of the class is composed of girls

A.y/(x + y)

B.x/xy

C.x/(x + y)

D.y/xy

**Ans:C **

13. (38 x 142) ÷ (4096) =?

1) 337.25

2) 269.8

3) 490

4) 84.3125

5) None of these

**Ans:1**

14. There are two candles of equal lengths and of different thickness. The thicker one lasts of six hours. The thinner 2 hours less than the thicker one. Ramesh lights the two candles at the same time. When he went to bed he saw the thicker one is twice the length of the thinner one. How long ago did Ramesh light the two candles .

**Ans: 3 hours. **

15. (17.52)2 =?

1) 280.9504

2) 290.5904

3) 306.9504

4) 280.5904

5) None of these

**Ans:3**

16. (37% of 2370) – (41% of 2105) =?

1) 13.85

2) 12.56

3) 13.10

4) 12.15

5) None of these

**Ans:1**

17. In a group of 15,7 have studied Latin, 8 have studied Greek, and 3 have not studied either.How many of these studied both Latin and Greek

A.0 B.3 C.4 D.5

**Ans.B **

18. If 13 = 13w/(1-w) ,then (2w)2 =

A.1/4

B.1/2

C.1

D.2

**Ans:C **

19. If a and b are positive integers and (a-b)/3.5 = 4/7, then

(A) b < a

(B) b > a

(C) b = a

(D) b >= a

**Ans: A **

20. In june a baseball team that played 60 games had won 30% of its game played. After a phenomenal winning streak this team raised its average to 50% .How many games must the team have won in a row to attain this average?

A. 12

B. 20

C. 24

D. 30

**Ans: C **

21. M men agree to purchase a gift for Rs. D. If three men drop out how much more will each have to contribute towards the purchase of the gift/

A. D/(M-3)

B. MD/3

C. M/(D-3)

D. 3D/(M2-3M)

**Ans: D **

22. A company contracts to paint 3 houses. Mr.Brown can paint a house in 6 days while Mr.Black would take 8 days and Mr.Blue 12 days. After 8 days Mr.Brown goes on vacation and Mr. Black begins to work for a period of 6 days. How many days will it take Mr.Blue to complete the contract?

A. 7

B. 8

C. 11

D. 12

**Ans:C **

23. 2 hours after a freight train leaves Delhi a passenger train leaves the same station travelling in the same direction at an average speed of 16 km/hr. After travelling 4 hrs the passenger train overtakes the freight train. The average speed of the freight train was?

A. 30

B. 40

C.58

D. 60

**Ans: B **

24. If 9x-3y=12 and 3x-5y=7 then 6x-2y = ?

A.-5

B. 4

C. 2

D. 8

**Ans: D **

25. There are 5 red shoes, 4 green shoes. If one draw randomly a shoe what is the probability of getting a red shoe

**Ans: 5c1/ 9c1 **

26. What is the selling price of a car? If the cost of the car is Rs.60 and a profit of 10% over selling price is earned

**Ans: Rs 66/- **

27. There is a square of side 6cm . A circle is inscribed inside the square. Find the ratio of the area of circle to square.

**Ans: 11/14 **

28. The price of a product is reduced by 30% . By what percentage should it be increased to make it 100%

**Ans: 42.857% **

**29. Directions to solve**

Each of the questions given below consists of a statement and / or a question and two statements numbered I and II given below it. You have to decide whether the data provided in the statement(s) is / are sufficient to answer the given question. Read the both statements and

• Give answer (A) if the data in Statement I alone are sufficient to answer the question, while the data in Statement II alone are not sufficient to answer the question.

• Give answer (B) if the data in Statement II alone are sufficient to answer the question, while the data in Statement I alone are not sufficient to answer the question.

• Give answer (C) if the data either in Statement I or in Statement II alone are sufficient to answer the question.

• Give answer (D) if the data even in both Statements I and II together are not sufficient to answer the question.

• Give answer(E) if the data in both Statements I and II together are necessary to answer the question.

a. Two towns are connected by railway. Can you find the distance between them?

I. The speed of the mail train is 12 km/hr more than that of an express train.

II. A mail train takes 40 minutes less than an express train to cover the distance.

A. I alone sufficient while II alone not sufficient to answer

B. II alone sufficient while I alone not sufficient to answer

C. Either I or II alone sufficient to answer

D. Both I and II are not sufficient to answer

E. Both I and II are necessary to answer

b. The towns A, B and C are on a straight line. Town C is between A and B. The distance from A to B is 100 km. How far is A from C?

I. The distance from A to B is 25% more than the distance from C to B.

II. The distance from A to C is of the distance C to B.

A. I alone sufficient while II alone not sufficient to answer

B. II alone sufficient while I alone not sufficient to answer

C. Either I or II alone sufficient to answer

D. Both I and II are not sufficient to answer

E. Both I and II are necessary to answer

c. Two cars pass each other in opposite direction. How long would they take to be 500 km apart?

I. The sum of their speeds is 135 km/hr.

II. The difference of their speed is 25 km/hr.

A. I alone sufficient while II alone not sufficient to answer

B. II alone sufficient while I alone not sufficient to answer

C.Either I or II alone sufficient to answer

D. Both I and II are not sufficient to answer

E. Both I and II are necessary to answer

d. How much time did X take to reach the destination?

I. The ratio between the speed of X and Y is 3 : 4.

II. Y takes 36 minutes to reach the same destination.

A. I alone sufficient while II alone not sufficient to answer

B. II alone sufficient while I alone not sufficient to answer

C. Either I or II alone sufficient to answer

D. Both I and II are not sufficient to answer

E. Both I and II are necessary to answer

30. 66 cubic centimetres of silver is drawn into a wire 1 mm in diameter. The length of the wire in metres will be:

A. 84 B. 90

C. 168 D. 336

31. 39 persons can repair a road in 12 days, working 5 hours a day. In how many days will 30 persons, working 6 hours a day, complete the work?

A. 10 B. 13

C. 14 D. 15

32. 0.04 x 0.0162 is equal to:

A. 6.48 x 10-3 B. 6.48 x 10-4

C. 6.48 x 10-5 D. 6.48 x 10-6

33. If a person walks at 14 km/hr instead of 10 km/hr, he would have walked 20 km more. The actual distance travelled by him is:

A. 50 km B. 56 km

C. 70 km D. 80 km

34. Let N be the greatest number that will divide 1305, 4665 and 6905, leaving the same remainder in each case. Then sum of the digits in N is:

A. 4 B. 5

C.6 D. 8

35. In one hour, a boat goes 11 km/hr along the stream and 5 km/hr against the stream. The speed of the boat in still water (in km/hr) is:

A. 3 km/hr B. 5 km/hr

C. 8 km/hr D. 9 km/hr

36. A father said to his son, “I was as old as you are at the present at the time of your birth”. If the father’s age is 38 years now, the son’s age five years back was:

A. 14 years B. 19 years

C. 33 years D. 38 years

37. The simple interest and the true discount on a certain sum for a given time and at a given rate are Rs. 85 and Rs. 80 respectively. The sum is:

A. Rs. 1800 B. Rs. 1450

C. Rs. 1360 D. Rs. 6800

38. If log 2 = 0.30103, the number of digits in 264 is:

A. 18 B. 19

C. 20 D. 21

39. How many 3-digit numbers can be formed from the digits 2, 3, 5, 6, 7 and 9, which are divisible by 5 and none of the digits is repeated?

A. 5 B. 10

C. 15 D. 20

40. If a school cafeteria needs c cans of soup each week for each student, and if there are s students in the school, for how many weeks will x cans of soup last?

A) csx B) xs/c C) s/cx D) x/cs E) cx/s

**C programming**

1.Is there any difference between following declarations?

1 : extern int fun();

2 : int fun();

A. Both are identical

B. No difference, except extern int fun(); is probably in another file

C. int fun(); is overrided with extern int fun();

D. None of these

2.Which of the following special symbol allowed in a variable name?

A. * (asterisk)

B. | (pipeline)

C. – (hyphen)

D. _ (underscore)

3.Point out the error in the following program.

#include<stdio.h>

struct emp

{

char name[20];

int age;

};

int main()

{

emp int xx;

int a;

printf(“%d\n”, &a);

return 0;

}

A. Error: in printf

B. Error: in emp int xx;

C. No error.

D. None of these.

4.We want to round off x, a float, to an int value, The correct way to do is

A. y = (int)(x + 0.5)

B. y = int(x + 0.5)

C. y = (int)x + 0.5

D. y = (int)((int)x + 0.5)

5.The binary equivalent of 5.375 is

A. 101.101110111

B. 101.011

C. 101011

D. None of above

6.A float occupies 4 bytes. If the hexadecimal equivalent of these 4 bytes are A, B, C and D, then when this float is stored in memory in which of the following order do these bytes gets stored?

A. ABCD

B. DCBA

C. 0xABCD

D. Depends on big endian or little endian architecture

7.How many times the program will print “FRESHERSWORLD” ?

#include<stdio.h>

int main()

{

printf(“FREHERSWORLD”);

main();

return 0;

}

A. Infinite times

B. 32767 times

C. 65535 times

D. Till stack doesn’t overflow

8.In which stage the following code

#include<stdio.h>

gets replaced by the contents of the file stdio.h

A. During editing

B. During linking

C. During execution

D. During pre-processing

9.If the file to be included doesn’t exist, the preprocessor flashes an error message.

A. True

B. False

10.What function should be used to free the memory allocated by calloc() ?

A. dealloc();

B. malloc(variable_name, 0)

C. free();

D. memalloc(variable_name, 0)

11.Specify the 2 library functions to dynamically allocate memory?

A. malloc() and memalloc()

B. alloc() and memalloc()

C. malloc() and calloc()

D. memalloc() and faralloc()

12.The keyword used to transfer control from a function back to the calling function is

A. switch

B. goto

C. go back

D. return

13.In a file contains the line “I am a boy\r\n” then on reading this line into the array str using fgets(). What will str contain?

A. “I am a boy\r\n”

B. “I am a boy\r”

C. “I am a boy\n”

D. “I am a boy”

14.Which of the following operations can be performed on the file “NOTES.TXT” using the below code?

FILE *fp;

fp = fopen(“NOTES.TXT”, “r+”);

A. Reading

B. Writing

C. Appending

D. Read and Write

15.What is the purpose of “rb” in fopen() function used below in the code?

FILE *fp;

fp = fopen(“source.txt”, “rb”);

A. open “source.txt” in binary mode for reading

B. open “source.txt” in binary mode for reading and writing

C. Create a new file “source.txt” for reading and writing

D. None of above

16. What is the output of the following program?

main()

{

char *src = “Hello World”;

char dst[100];

strcpy(src,dst);

printf(“%s”,dst);

}strcpy(char *dst,char *src)

{while(*src) *dst++ = *src++;

}

) “Hello World” b)”Hello” c)”World” d) NULL e) unidentified

** Ans: d) NULL**

.

17 .What is the output of the following program?

main()

{

int l=6;

switch(l)

{ default : l+=2;

case 4: l=4;

case 5: l++;

break;

}

printf(“%d”,l);

}

a)8 b)6 c)5 d)4 e)none

**Ans : a) 8**

18.What is the output of the following program?

main()

{

int x=20;

int y=10;

swap(x,y);

printf(“%d %d”,y,x+2);

}

swap(int x,int y)

{

int temp;

temp =x;

x=y;

y=temp;

}

a)10,20 b) 20,12 c) 22,10 d)10,22 e)none

**Ans:b**

19. Which of the following about the following two declaration is true

i ) int *F()

ii) int (*F)()

a) Both are identical

b) The first is a correct declaration and the second is wrong

c) The first declaraion is a function returning a pointer to an integer and the second is a pointer to function returning int

d) Both are different ways of declarin pointer to a function

**Ans : c)**

20. What are the values printed by the following program?

#define dprint(expr) printf(#expr “=%d\n”,expr)

main()

{

int x=7;

int y=3;

dprintf(x/y);

}

a) #2 = 2 b) expr=2 c) x/y=2 d) none

**Ans: c)x/y=2**