You are on page 1of 3

Answers

1. C. 0

2. C. main()

3. A. { }

4. B. ;

5. C. /* Comment */

6. B. real

7. D. ==

8. E. All of the above

9. B. &&

10. A. True

ANS

11. a. True

12. b. False [ parameters can be empty without void too!]

13. b. False

14. a. The function addition is called by passing the values

15. a. Any modifications to the variables x & y from inside the function will not have any
effect outside the function

16. b. pass by reference

17. b. The location of variable in memory is passed to the function so that it can use the same
memory area for its processing

18. d. None of above


19. b. False

20. d. 10 2.5

Answers
21. c. Equals to operator mistake

22. b. Repeat the specified lines of code

23. In while structure condition is tested before executing statements inside loop whereas in do
structure condition is tested before repeating the statements inside loop

24. b. Until

25. d. Switch

26. d. Switch

27. c. skips the rest of the loop in current iteration

28. a. Both of the above code fragments have the same behaviour

29. c. Will display x is 3, so jumping to third branch and jumps to thirdBranch

30. c. we can put range for case such as case 1..3

Answers

31. a. True

32. a. Reads a line of string from cin into mystring

33. d. None of above

34. d. <sstream>
35. c. <sstring>

36. b. The second input overwrites the first one

37. b. The program worked as expected without any errors during its execution

38. c. readable

39. c. short int

40 b. Local variables are declared inside a function and accessible within the
function on

Answers

41. d. Both a and c

42. c. <<

43. b. Both are similar but endl additionally performs flushing of buffer

44. c. Cout

45. a. Cin

46. b. Monitor

47. a. Keyboard

48. d. All of above

49. d. >>

50. d. all of above

You might also like