Вы находитесь на странице: 1из 3

BMS COLLEGE OF ENGINEERING, BANGALORE-19

(Autonomous College under VTU) CONTINUOUS INTERNAL EVALUATION Name of Candidate

Answer Sheet for Quiz 1


Semester

II
S 2 I

Section

USN

Course Code

C C C P

C
1. What is the output of this program___________________ void main() { int x; x=3*4%5; printf(x=%d ,x); } 2. Point out which of the following variables names are invalid: a. gross-salary b. INTEREST c. salary of emp d. avg. 3. What will be printed as the result of the operation below__________ main() { int a=0; if(a==0) printf(Welcome); printf( Hi); }

4. What is the output of this program___________ void main() { int a,b; a=5.999; b=5.000; printf(a=%d b=%d,a,b); } 5. What does the following C statement print? printf(%d,++5); a. 5 c. 7 b. 6 d. An error message

6. Integer division in a C program results in a. Truncation b. rounding c. overflow

7. Parallelogram symbol in flowchart indicates a. Beginning or Termination b. Input /Output c. Predefined process d.None of these 8. What is the final value of x when the code int x; for(x=0; x<10; x++) {} is run? A. 10 B. 9 9. Which of the following is a correct comment? A. */ Comments */ B. ** Comment ** 10. void main() { int a=10,b=20; char x=1,y=0; if(a,b,x,y) { printf("EXAM"); } } What is the output? A) XAM is printed B) exam is printed C) Compiler Error D) Nothing is printed C. /* Comment */ D. { Comment }

C. 0 D. 1

11. What will be the value of `a` after the following code is executed #define square(x) x*x a = square(2+3) A) 25 C) 11 B) 13 D) 10 12. What is the output of the following code? #include<stdio.h> void main() { char letter =`Z`; printf("\n%c",letter); } A)Z C) %Cz B) z D) %Cz 13. All static variables are automatically initialized to zero (T/F)

14. Which of the following will not read an integer number a)%d b)%f c)%ld d)%c 15. Which of the following is a correct syntax for the printf statement? a) printf(Hello World); b) printf(Hello World); c) printf(Hello World) d) printf{Hello World} 16. The ------------- keys include the number keys and the alphabet keys 17. Which of the following is used to determine whether a character is in lowercase? a) islower b) islow c) islowercase d)isupper 18. Which one of the following is appropriate to describe the C language? a) Structured Language b) Object-oriented language c) Machine Language d) Assembly Language 19. Which component is known as the brain of a computer? a) Monitor b) CPU c) Memory d) None of the above 20. What is the output of the following code? #include<stdio.h> void main() { int a=0,b=0; a = (b = 75) + 9; printf("\n%d, %d",a, b); } A) 75, 9 B) 75, 84

C) 84, 75 D) None of these options

Вам также может понравиться