Huawei
Company
HR Interview
Interview
UCHAR j;
for(j=0;j<2000;j++);
Number of iterations?
Read Solution (Total 3)
-
- Ans: infinite iterations.
since UCHAR can reach only up to 255 and returns to 0 on further increment, the condition is always satisfied.
Feel free to express your ideas.
- 8 years agoHelpfull: Yes(12) No(0)
- since UCHAR can reach only up to 255 and returns to 0 on further increment, the condition is always satisfied.
8 iterations - 8 years agoHelpfull: Yes(2) No(0)
- 2000 iteration because loop start from 0 and continue to1999
- 5 years agoHelpfull: Yes(0) No(0)
Huawei Other Question
37.The letters A, B, C, D, E, F and G, not necessarily in that order, stand for seven consecutive integers from 1 to 10 D is 3 less than A B is the middle term F is as much less than B as C is greater than D G is greater than F
1. The fifth integer is
(a) A
(b) C
(c) D
(d) E
(e) F
2. A is as much greater than F as which integer is less than G
(a) A
(b) B
(c) C
(d) D
(e) E
3. If A = 7, the sum of E and G is
(a) 8
(b) 10
(c) 12
(d)
4. A - F = ?
(a) 1
(b) 2
(c) 3
(d) 2
(e) Cannot be determined
5. An integer T is as much greater than C as C is greater than E. T can be written as A + E. What is D?
(a) 2
(b) 3
(c) 4
(d) 5
(e) Cannot be determined
6. The greatest possible value of C is how much greater than the smallest possible value of D?
(a) 2
(b) 3
(c) 4
(d) 5
(e) 6
100,60,1020,70,110 what comes next?