WorksheetsData Type & Operator
Total questions: 15
Worksheet time: 4mins
Which of the following is Ternary Operator ?
condition : true ? false
condition ? false : true
condition : false ? true
condition ? true : false
What is the name of ^ operator ?
Power
2's Complement
XOR
1's Complement
Which of the following is a Bitwise Operator ?
||
|
&&
!
What is the result of 25 >> 3 ?
100
200
2
3
What is the output of : printf("%d", printf("hello\t"))
hello 5
hello 6
5 hello
6 hello
What is the use of unary & operator ?
Bitwise And
Logical And
Address
Pointer
What is the result of following code ?
int x = 10 ;
x =+ 3 ;
printf("%d", x) ;
10
13
3
7
Which of the following is post decrement operator ?
++ x
x ++
-- x
x --
Which of the following is not a Comparison Operator ?
<=
>=
!=
=
What is the output of following statement ?
printf("hello\t") || printf("hii\t") || printf("bye\t")
hello hii bye
bye hii hello
hello
hello hii
What is the format specifier for Signed Short ?
%hu
%hd
%su
%sd
Given n bits, what is the range of signed numbers in 1's Complement ?
- (2n-1) to (2n-1)
- (2n-1-1) to (2n-1-1)
- 2n-1 to (2n-1-1)
- 2n to (2n-1)
Given n bits, how many distinct values can be stored using 1's Complement ?
2n-1
2n
2n-1-1
2n-1
Given 4 bits, how will 8 be stored in signed 2's complement form ?
8
-8
7
-7
Given 4 bits, how will -6 be stored in signed 1's complement form ?
0110
1001
1010
1110
