Articles added in Mathematics Lab | Cyber Lab is now open | Astronomy Lab is now open | VLSI Lab is now open | 120 SEO Tips article published | More exciting articles coming soon!

Computer Sci. Quiz 2 (C++ Basics)

1. Which of the following is not a loop method in C++?
A. while B. for
C. again D. repeat

2. If no condition is mentioned, can the for loop run infinite times?
A. Yes B. No
C. Depends on code structure D. Depends on break commands

3. Which follows the case statement?
A. ;; B. :;
C. : D. ':'

4. Which of the following gives the memory address of a pointer c?
A. 'x' B. x;
C. x() D. :x

5. Which of the following declares a variable of struct foo?
A. var foo; B. foo;
C. foo() D. foo var;

6. By default, all members of the class have __ access to all its members?
A. Public B. Private
C. Declared D. Restricted

7. A class can inherit members from more than one class?
A. Yes B. No
C. Code specified D. Operator specified

8. Which of the function is used to allocate space for array in memory?
A. willloc() B. malloc()
C. Realloc() D. none of the above

9. Does C++ supports multiple inheritance?
A. No B. Yes
C. Only once D. Under special commands

10. All static data members are initialized to?
A. One B. Two
C. Non negative integers D. Zero

CACKLE comment system

Programming Resources
Computer Networking Fundamentals Android Application