HomeUncategorized February 13, 2021 No Comments Previous Next 1. What is an unsigned integer? Used to represent both positive and negative integers No such keyword in C None of the above. Used to represent only positive integers 2. Pick the odd statement? Conditional operator Performs operation on three operands All of above Address operator also called Unary operator Modify operators come under Unary operator 3. What is the Output of following Code? #include void main() { double PI = 3.142 + 0.0001111; printf(“%f “, PI); } 3.142111 Compiler Error Garbage value 3.1421111 4. Can we use a switch statement to switch on strings? Yes No Depends on the version of the software. Depends on compiler 5. What is the Output of following Code? #include int main() { int a = 8; printf(“%d , %d”, a << 1,a << 2); return 0; } 64,64 16,16 32,32 16,32 6. What is the Output of following Code? #include main() { int x=5 , y=3; x++ ? –y : ++x ; printf(“%d,%d”,–x , –y); } 6, 2 4, 1 5, 1 6, 1 7. What is the Output of following Code? #include<stdio.h> char ch ; float f ; void main() { printf(“%d, %f”, ch, f); } null_character , 0.0 0, 0.000000 null_character, 0.000000 0 , 0.0 8. Which of these selection statements test only for equality? switch if if & switch None of the mentioned. 9. What will be the output of following code? #include main() { signed char ch = 120; while(++ch) { printf(“%d\t”,ch); } } 121 to 127 infinite loop 121 to 127,-128,-127,….-1 121 to 127, -128 10. What will be the output of following code? #include int main() { int i=4,j=5; while(i+1?i–:j++); printf(“%d”,i); return 1; } 1,0,-1 Compile time error infinite loop -1 Loading … Question 1 of 10 Previous Next Add Comment Cancel Reply Save my name, email, and website in this browser for the next time I comment.