Q1. .25 + 0.0625 = 0.3125
Q5. Option (C) is correct.
Only printStarsB(5) function is going to print the given output.
Explanation:
In the function printStarsA(5) the condition inside for loop that is..
if (i % 2 == 0) is false becuause when i = 5 then condition is false, since 5 is an odd number and if condition checks for an even number. hence the statement inside if are not going to XXXXXXX for XXX XXXXXX, XX you can see in XXX output XXX numbers XX stars are printed.
i.e first lines XXXXX X XXXXX,
second XXXX print 3 XXXX
XXX third line print 1 XXXX.
hence printStarsA(X) XXXXXXXX is XXXXXXX.
XX the other XXXX XXX function XXXXXXXXXXX(5) is XXXXX.
Because in the XXXXXXXXX statement
i = (numStars % 2 == X)? numStars: numStars + 1;
XXXX XXXXXXXX = 5
numStars % X = 1 i.e (X %X == 1) is XXXX, i.e the XXXXXXXXX is XXXX for XXXXX XXX number.
hence
while loop is XXXXXXXX XXX XXXXX odd XXXXXX XX. 5, 3, 1 and XXXXX XXX desired XXXXXX.
Q6. D
Q7. X XX incorrect.
x= 0x36 = XXXX XXXX
y= 0x12 = XXXX 0010
x &Y = XXXX 0010 (X X 12)
so, it XX XXXXXXXXX. while rest XX all XXX XXXXXXX.
Q8. Answer is X.
x = 0x25. Binary is XXXX XXXX
XX you XXXX shift a XX X XXXXXXXX XXXX XXXXXX XXXX XX
0100 1010 (0x4A). XXXXX is correct.
Q9. So XXXXXX XX X.
condition (x && y) XXXX true XX XXXX are non-XXXX.
condition (X& y) will XXXXX as it become XXXX.
X (XX) & y (XX) = (XXXX XXXX) & (0000 XXXX) = (XXXX 0000). so
output will XX "XXXX XX Move on...!"
XXX. XXXXXX: X
XXXXXXX if XXXXXXXX XXXXX XXXXXXXX XXXXX in 2's complement XXXX also while fetching this data it will again do 2's XXXXXXXXXX. XX, there is XX XXX XXXXX XXX assign to XXXXXX XXXXXXXX or positive number.
XXX&XXX;15. XXXXXX: XXXXXX - (a) - x XX less XXXX or equal XX 2*y x XX less than or XXXXX XX 2*y
XXXXXXXXXXX:
X) XXX f(x,,y); XXX int f(int x, int y); these XXX XXXXXX XXXXXXXXX functions.
The process in XXXXX a XXXXXXXX XXXXX itself XXXXXXXX or XXXXXXXXXX is XXXXXX XXXXXXXXX and the corresponding function is XXXXXX XX XXXXXXXXX XXXXXXXX.
X)Here, we are using XXXXXXXXXXX XXXXXXXXXX i.e (x>y)?XXX:XX .
XX the condition XX true it XXXXXX the first statement i.e, XXX
XX XXX condition is false it XXXXXX the second XXXXXXXXX i.e, No
X)Here, the value x and y XXX in XXXXXXX XXXX, so that the comparison (5/2&XX;X) i.e (2.5&XX;2) XX it is an XXXXXXX XXXX it XXXXX (X&XX;X)
X) Static declaration of f should XXXXXX a non-static XXXXXXXXXXX . XX, in XXX XXXXXX XXXXXXXX it XXXXXX have (;)
">