NEWS

Search This Blog

Thursday, 17 August 2017

PG TRB COMPUTER SCIENCE MCQS WITH ANSWERS

          PG TRB COMPUTER SCIENCE MCQS WITH ANSWERS

          OBJECT ORIENTED PROGRAMMING WITH C
1. What is the only function all C++ programs must contain?
A. start()
B. system()
C. main()
D. program()
ANSWER: C

2. What punctuation is used to signal the beginning and end of code blocks?
A. { }.
B. -> and <-.
C. BEGIN and END.
D. ( and ).
ANSWER: A


3. Which of the following is a correct comment?
A. */ Comment */.
B. ** Comment **
C. /* Comment */.
D. { Comment }.
ANSWER: C

4. Which of the following is not a correct variable type?
A. Float.
B. Real.
C. Int.
D. Double.
ANSWER: B

5. Which of the following concepts means adding new components to a program as it runs?
A. Data hiding
B. Dynamic typing
C. Dynamic binding
D. Dynamic loading
ANSWER: D

6. Which of the following is the boolean operator for logical-and?
A. &.
B. &&.
C. |.
D. |&.
ANSWER: B

7. The directives for the preprocessors begin with_____________.
A. ampersand symbol (&).
B. two Slashes (//).
C. number Sign (#).
D. less than symbol (<).
ANSWER: C

8. There is a unique function in C++ program by where all C++ programs start their execution with
_____________.
A. start().
B. begin().
C. main().
D. output().
ANSWER: C

9. __________ storage class is the only request to the compiler.
A. Extern.
B. Static.
C. Register.
D. Auto.
ANSWER: A

10. How many times is a do while loop guaranteed to loop?
A. 0.
B. Infinitely.
C. 1.
D. Variable.
ANSWER: C

11. Which of the following is not a jump statement in C++?
A. Break.
B. Goto.
C. Exit.
D. Switch.
ANSWER: D

12. A continue statement causes execution to skip to ____________.
A. the return 0; statement.
B. the first statement after the loop.
C. the statement following the continue statement.

D. the next iteration of the loop.
ANSWER: D
13. Which of the following approach is adapted by C++?
A. Top-down
B. Right left
C. Bottom-up
D. Left-right
ANSWER: C

14. __________ is an arithmetic operator.
A. >
B. &&
C. ?:
D. %
ANSWER: D
15. Which looping process checks the test condition at the end of the loop?
A. For.
B. While.
C. Do-while.
D. No looping process checks the test condition at the end.
ANSWER: C

16. Variables that are declared, but not initialized, contain __________.
A. blank spaces.
B. zeros.
C. "garbage" values.
D. nothing - they are empty.
ANSWER: C

17. 18. Array indexing always starts with the number ____________.
A. 0.
B. 1.
C. 2.
D. \0.
ANSWER: A

18. 16. In C++, 14 % 4 = ___________.
A. 1
B. 2
C. 3
D. 4
ANSWER: B

19. Variables with names that describe the data stored at that particular memory location are called
________________.
A. identifiers.
B. constant variables.
C. floating point variables.
D. mnemonic variables.
ANSWER: D
20. The name of a variable is known as its _______________.
A. identifier.
B. constant.
C. data type.
D. base.
ANSWER: A

21. Which of the following is correct about function overloading?
A. The types of arguments are different.
B. The order of argument is different.
C. The number of argument is same.
D. Both A and B.
ANSWER: D

22. When a data type contains decimal numbers, assign the type_____________.
A. int.
B. char.
C. double.
D. long int.
ANSWER: C

23. Set precision requires the header file___________________.
A. stdlib.h.
B. iomanip.h.
C. console.h.
D. conio.h.
ANSWER: B

24. The memory address of the first element of an array is called ____________.
A. floor address.
B. foundation address.
C. first address.
D. base address.
ANSWER: D

25. Which of the following concepts means wrapping up of data and functions together?
A. Abstraction
B. Encapsulation
C. Polymorphism
D. Inheritance
ANSWER: B

 subscribe my blog and share your Mail id in following link..

   for all the subject full materials Books download  link

     CLICK HERE

ADSENCE ADD