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






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






3. tab






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






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






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






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






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






9. data types that refer to numbers with decimals






10. A function is invoked with a ________.






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






12. Most calculations are normally performed by ______ statements.






13. The symbol for the binary scope resolution operator






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






15. Sets floating-point values to a fixed decimal format






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






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






18. int namespace include using return examples of ___________






19. Symbol that denotes an action to be performed






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






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






22. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.






23. In inheritance the ____________ is the class that supplies the inherited members.






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






25. Creates a copy of a string.






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






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






28. * / % + -






29. The stream extraction operator






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






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






32. In inheritance the ____________ is the class the receives the inherited members.






33. Used for function calls and local variables






34. A function that calls itself






35. Naming convention for C++ programs






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






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






38. Keyword public is a(n) _________






39. When it is not known in advance how many times a set of statements will be repeated a _________value can be used to terminate the repetition.






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






41. You can declare default values for a function in the ____________________.






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






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






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






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






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






47. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.






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






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






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