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. Used to qualify hidden names so that they can be used.






2. The symbol for the binary scope resolution operator






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






4. A set of values together with a set of operations






5. 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


6. A file must be ________ before data can be written to or read from it.






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






8. This is used to mark the end of a complete C++ programming statement.






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






10. A function is invoked with a ________.






11. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')






12. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.






13. A function ________ enables a single function to be defined to perform a task on many different data types.






14. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.






15. Header file that contains commonly performed mathematical functions






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






17. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.






18. 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.






19. A type of pointer that can point at objects of any data type.






20. The sign you use for pointers






21. A member function should be declared static if it does not access __________ class members.






22. Allows the programmer to store a value in a variable






23. Every C++ statement ends with a(n) _________.






24. Used for dynamically allocated variables






25. A __________ should be used to declare the size of an array because it makes the program more scalable.






26. 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.






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






28. A pointer is a variable that contains as its value the____________ of another variable.






29. Two slash marks ( // ) indicate __________ of a comment






30. Executable version of program






31. OOD also takes advantage of ________ relationships where new classes of objects are derived by absorbing characteristics of existing classes - then adding unique characteristics of their own.






32. Naming convention for C++ programs






33. Message displayed to the screen asking user for input; generated with an output statement






34. 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.






35. Characters used to separate symbols or reserved words or identifiers and statements






36. Default name of executable file






37. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.






38. * / % + -






39. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.






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






41. The storage-class specifiers are mutable - auto - ________ - extern and static.






42. The ________ of an identifier is the portion of the program in which the identifier can be used.






43. A function that can be used to read character data including whitespace






44. If a member initializer is not provided for a member object of a class the object's __________ is called.






45. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.






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






47. A recursive function typically has two components: One that provides a means for the recursion to terminate by testing for a(n) ________ case and one that expresses the problem as a recursive call for a slightly simpler problem than the original call






48. Function ________ is used to produce random numbers.






49. You must have a ___________ for every variable you intend to use in a program






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