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. Compares two strings and returns 0 if they are equal.






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






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






4. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors






5. Naming convention for C++ programs






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






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






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






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






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






11. Use 2 characters to represent one






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






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






14. Symbol that denotes an action to be performed






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






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






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






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






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






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






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






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






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






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






25. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.






26. Type casting syntax






27. Used for dynamically allocated variables






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






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






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






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






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






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






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






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






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






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






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






39. The ________ program combines the output of the compiler with various library functions to produce an executable image.






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






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






42. Words that are used for special purposes in a program






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






44. The ________ qualifier is used to declare read-only variables.






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






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






47. The sign you use for pointers






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






49. Preprocessor directive syntax






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