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






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






3. The process of determining if an array contains a particular key value is called _________ the array.






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






5. A filestream variable that represents the default output device






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






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






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






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






10. Whole numbers - no decimals and no commas included






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






12. int namespace include using return examples of ___________






13. The ________ program transfers the executable image of a C++ program from disk to memory.






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






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






16. Preprocessor directive syntax






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






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






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






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






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






22. Symbol that denotes an action to be performed






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






24. Classes can have relationships with other classes. These relationships are called ________.






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






26. tab






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






28. Type casting syntax






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






30. The sign you use for pointers






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






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






33. Causes the program to immediately goes back to the top of the loop. the remainder of the statements in the loop are ignored for this current iteration.






34. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.






35. An expression in which all operands have the same data type - result will have the same data type as operands






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






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






38. Use 2 characters to represent one






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






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






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






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






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






44. Function ________ is used to set the random number seed to randomize a program.






45. A program that finds and attaches to your program the indicated libraries for compilation






46. An expression that has operands with different data types






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






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






49. A________ allows the compiler to check the number & types and order of the arguments passed to a function.






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