The constants 20 20 base 10 024 24 base 8 and 0 times 14 14
Solution
Question 41
In normal mathematics, we use generally base 10, binary is base 2, octal is base 8, hexa is base 16 . Here the number following base represents how many unique characters are used to represent any number in that base.
So 24 in base 8 = (2*(81 ) + 4*(80)) = 16 + 4 = 20.
Similarly 14 in base 16 = (1*(161 ) + 4*(160)) = 20.
So as all value turns out to be 20 . and so internal binary representation is same for all. so the Correct Answer is a) TRUE.
Question 42
This is because the expression i/j = 0 . This happens because i and j are integers and when we divide one integer with another integer the answer is integer rounded to its floor value (3/4 = 0.75 = 0 (floor value)).
So Correct Answer is e) 0.0
Question 43
Correct Answer is (b) 5.0. As explained in question 42 above i/j = 0 and expression (r+= i/j ) => evaluate i/j and add it to r . During addition 0 is upgraded to float value because of internal type conversion of compiler and answer is 5.0.
Question 44
Correct Answer is a) nothing . The if condition states that if the value of a is greater that 50 then print \"passed\" but as the value of a = 50. so if condition is false and hence Nothing is printed.
Question 45
Correct Answer is d) is the only ternary operator in C . Conditional operator ( first ? second : third ).
The first operator is automatically considered as bool, if the bool value is true then second is assigned as value else third is evaluated.
Question 46
Correct Answer is b) Case value must be an integer value . The other condition options are preferred way of writing switch statement but are not compulsory. So if you don\'t write default or if you don\'t end a case with break statement compiler won\'t raise any error, but if the case value is not integer compiler will raise the error.
Question 47
Correct Answer is a) All values are equal. i , j and k have qual values which is 2.
Question 48
Correct Answer D) answer == 4 ? printf (\"correct\") : printf(\"incorrect\")
Question 49
Correct Answer c) 3 . % operator is called modulo operator this gives reminder so 27 % 4 gives answer 3.
Question 50
Correct Answer c) K is lower-case alpha. %c is used to replace character

