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. Symbol that denotes an action to be performed






2. Operator with only one operand






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






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






5. Creates a copy of a string.






6. Operator with two operands






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






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






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






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






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






12. To allow file access in a program you must #include this header file.






13. The number used to refer to a particular element of an array is called its ________.






14. Default name of executable file






15. Syntax for named constant declaration






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






17. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.






18. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.






19. A memory location with a name and data type - its content may be changed during program execution






20. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.






21. All ______ must be declared before they are used.






22. Lists and tables of values can be stored in arrays or __________.






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






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






25. The stream extraction operator






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






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






28. Naming convention for C++ programs






29. The three values that can be used to initialize a pointer are 0 - __________ and an address.






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






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






32. Keyword public is a(n) _________






33. Preprocessor directive syntax






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






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






36. A variable declared outside any block or function is a ________ variable.






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






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






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






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






41. Executable version of program






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






43. Whole numbers - no decimals and no commas included






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






45. Function ________ is used to produce random numbers.






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






47. An operator that can only be used with int values. result will always be an int.






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






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






50. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.