# C Programming and Problem Solving Questions and Answers 181 to 190

## C Programming and Problem Solving

### Questions 181 to 190

181.
Which of the following is not a character constant?
 (a) ‘\60’ (b) ‘\x24’ (c) ‘sum’ (d) ‘A’ (e) ‘\012’.
182.
In the statement # define, the symbol # must commence from
 (a) Any where in any line (b) First character of that line (c) Before main() function but after # include statement always (d) Before main() function but before # include statement always (e) Any where out side of main() always.
183.
How many number of tokens are there in the following statement, provided ‘value’ is
an integer variable?
if(  value == 21 )
 (a) 3 (b) 4 (c) 5 (d) 6 (e) 7
184.
What is the final value of ‘a’, if the following code is executed with initial value of ‘a’ as 10?
int  b=10, c=20, d=-10;
a = 20-c >  b+d;
a--;
 (a) 9 (b) 0 (c) 10 (d) 1 (e) -1
185.
Arrange the operators ‘&’,  ‘&&’,  ‘|’, ‘||’, ‘^’ based on priority.
 (a) &     ^      |      &&   || (b) &     &&   ^      |      || (c) &     &&   |      ^      || (d) &     &&   |      ||      ^ (e) &     |       ^      &&   ||.
186.
The number of binary bitwise operators are
 (a) 2 (b) 3 (c) 4 (d) 5 (e) 6
187.
From the following, which expression will correctly swap two integers x, y without using a temporary variable?
 (a) (x^=y), ( y^=x) (b) (x^=y), ( y^=x), (x^=y) (c) x^=(y^=x) (d) (x=y), (y=x) (e) (x=y), (y=x), (x=y).
188.
Pick the fully correct and portable method to obtain the most significant byte of an unsigned integer x.
 (a) x >>24 (b) x || 0xFF00 (c) x && 0xFF00 (d) x >> (CHAR_BIT * (sizeof(int)-3)) (e) x >> (CHAR_BIT * (sizeof(int)-1)).
189.
What will be the value of ‘i’ after the following code is executed, provided 1 as the initial value of ‘i’?
i = (i <<= i%2 );
 (a) Syntax Error (b) Logical error (c) 2 (d) 1 (e) 0.
190.
What is the final output for the below code?
int  i = 020;
int  j = 025;
int  k = 50;
k=i + j;
printf( “%d”, k );
 (a) 45 (b) 45 (c) 50 (d) 37 (e) 37