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. Executable version of program






2. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.






3. tab






4. Most calculations are normally performed by ______ statements.






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






6. The sign you use for references






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






8. Repeating a set of instructions a specific number of times is called_________repetition.






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






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






11. An expression that has operands with different data types






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






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






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






15. Function ________ is used to produce random numbers.






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






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






18. Names of things that are used in a program - can apply to variables & constants and functions






19. The elements of an array are related by the fact that they have the same name and ___________.






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






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






22. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.






23. data types that refer to numbers with decimals






24. The ________ statement in a called function passes the value of an expression back to the calling function.






25. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________






26. For a local variable in a function to retain its value between calls to the function it must be declared with the ________ storage-class specifier.






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






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






29. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.






30. The only integer that can be assigned directly to a pointer is_____________.






31. The process of placing the elements of an array in order is called ________ the array.






32. These are data items whose values do not change while the program is running






33. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.






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






35. The _____ causes the contents of another file to be inserted into a program.






36. C++ programs are normally typed into a computer using a(n) ________ program.






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






38. Operator with only one operand






39. Associate an identifier with a memory location






40. The three ways to return control from a called function to a caller are ________ - return expression and encounter.






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






42. Keyword public is a(n) _________






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






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






45. Operator with two operands






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






47. A function that calls itself either directly or indirectly - through another function) - is a ________ function.






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






49. Type casting syntax






50. Program components in C++ are called functions and ________.