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.
2.How many squares in a chess board?
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?
4.what is the angle between hour and minute hand when the time is 7:20
C Aptitude questions
Find the output
int const * p=5;
float me = 2.1;
double you = 2.1;
#define a 10
#define a 20
static int a = 5;
5what are the different data types?
6.Tell about malloc?
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
11.what is function?
12what is a process in OS?
13questions about project, seminar?
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
c. compiler error
d. not executed
25How many times is the for loop executed
c. compiler error
d. not executed
26for selection, we use
b .for loop
c. while loop
27Which of the following is executed 1rst?
i .&& ii.|| 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:
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:
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
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:
43If carrier is modulated 100 % then what is the percentage increment of power:
44 Convert (17)10 to binary.
45(375)10 = ()8
46During a day at which time most distortion takes place.