Question: the right answer. (45 marks I Choose 1. The C-preprocessors are specified with a)# symbol. d) None of the mentioned b) $ 2. Which of
the right answer. (45 marks I Choose 1. The C-preprocessors are specified with a)# symbol. d) None of the mentioned b) $ 2. Which of the following is not a valid variable name declaration? a)int-a3; b) inta_3; c) int 3-a; d) int -3a 3. Which is correct with respect to size of the datatypes? a) char > int > float b) int > char float c)har char > int 4. Loss in precision occurs for typecasting from a). char to short b). float to double c).long to float d). double to int 5. %f access specifier is used for a). Strings b). Integral types c). Floating type d). All of the mentioned 6. What is the output of this C code? int c int a - 10; c a+ b; double b-5.6 printf("%d", c); ?). ?). 15 b). 16 15.6 d). 10 7. Which is the best way to generate numbers between 0 to 99 a) rand()/ 100 b) rand() % 100 c) rand(100) d) srand(10o) 8. A pointer is a) A variable that stores address of other variable c) A variable that stores address of an instruction b) A keyword used to create variables d) All of the above 9. What is the output of this C code? int x - 8; printf("%d ", x); c)2 d) Depends on the compiler a)4 b) 16 10. What is the output of this C code? const double pi 3.14; printf("pi is %f", pi); b) Compile time error a) pi is 4 11. What is the output of this C code? c) pi is 3.14 d)ps followed by a garbage value int a -1, b 2; b)32 printf("%d %d", a, b); a) 12 d) 21
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
