Test your basic knowledge |

C++ Programming Basics

Subject : it-skills
Instructions:
  • Answer 50 questions in 15 minutes.
  • If you are not ready to take this test, you can study here.
  • Match each statement with the correct term.
  • Don't refresh. All questions and answers are randomly picked and ordered every time you load a test.

This is a study tool. The 3 wrong answers for each question are randomly chosen from answers to other questions. So, you might find at times the answers obvious, but you will see it re-enforces your understanding as you take the test each time.
1. __________ can be used to assign an object of a class to another object of the same class.






2. For every opening brace in a C++ program there must be a ______________.






3. When a value of one data type is implicitly (automatically) changed to another data type






4. The keyword ________ is used in a function header to indicate that a function does not return a value or to indicate that a function contains no parameters.






5. This manipulator is used to establish a field width for the value immediately following it.






6. The ________ enables access to a global variable with the same name as a variable in the current scope.






7. Naming convention for C++ programs






8. Objects have the property of ________although objects may know how to communicate with one another across well-defined interfaces - they normally are not allowed to know how other objects are implemented.






9. Used to qualify hidden names so that they can be used.






10. Every C++ program begins execution at the function _________.






11. Identifier or expression that is part of the calculation to be performed






12. Function ________ is used to produce random numbers.






13. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.






14. Associate an identifier with a memory location






15. The size & shape & color and weight of an object are considered






16. A variable that is known only within the function in which it is defined is called a ________.






17. The escape sequence ___ when output with cout and the stream insertion operator - causes the cursor to position to the beginning of the next line on the screen.






18. = & | are examples of ____________.






19. A human readable file that contains C++ program






20. The _________ begins the body of every function and the _________ ends the body of every function.






21. Returns the length of a string excluding the null terminator.






22. Use 2 characters to represent one






23. Grammar rules of the language; compiler will try to identify and locate syntax errors






24. directive A statement that starts with a # is called a ____________.






25. Compares two strings and returns 0 if they are equal.






26. When you create a ___________________in the base class and then call it using an object the function will know to look in the inherited class for the specifics of that function.






27. The stream extraction operator






28. Member objects are constructed __________ their enclosing class object.






29. The idea that you can call the same function and the output will depend on the type of object you're using.






30. All C++ Variables are_________.






31. A ________ program executes before the compiler's translation phase begins.






32. A variable that holds the address of another variable.






33. A C++ statement that makes a decision is ______.






34. The conditional operator. it evaluates a line of code and returns one thing if the condition is true and a different thing if the condition is false.






35. A function is invoked with a ________.






36. Class members specified as _________ are accessible only to member functions of the class and friends of the class.






37. The symbol for the binary scope resolution operator






38. The __________ operator reclaims memory previously allocated by new.






39. The modulus operator (%) can be used only with __________.






40. The ________ program combines the output of the compiler with various library functions to produce an executable image.






41. An array that uses two subscripts is referred to as a(n) _________ array.






42. Initializers __________ must be used to initialize constant members of a class.






43. The address-of operator. it is used to assign pointers and to print the address of variables.






44. Class members are accessed via the ________ operator in conjunction with the name of an object (or reference to an object) of the class or via the arrow (->) operator in conjunction with a pointer to an object of the class.






45. Syntax for named constant declaration






46. The sign you use for pointers






47. Type casting syntax






48. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line

Warning: Invalid argument supplied for foreach() in /var/www/html/basicversity.com/show_quiz.php on line 183


49. Preprocessor directive syntax






50. Used for function calls and local variables