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. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.






2. Default name of executable file






3. A function is invoked with a ________.






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






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






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






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






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






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






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






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






12. Keyword public is a(n) _________






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






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






15. This manipulator is used to establish a field width for the value immediately following it.






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






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






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






19. Associate an identifier with a memory location






20. Type casting syntax






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






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






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






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






25. The sign you use for references






26. * / % + -






27. Naming convention for C++ programs






28. This manipulator causes the field to be left-justified with padding spaces printed to the right.






29. A constant object must be __________; it cannot be modified after it is created.






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






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






32. int namespace include using return examples of ___________






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






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






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






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






37. A sequence of operands and operators that describe a calculation to be performed






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






39. Used for dynamically allocated variables






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






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






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






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






44. Operator with only one operand






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






46. __________ can be used to assign an object of a class to another object of the same class.






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






48. Smallest individual unit of a programming language - special symbols or word symbols or identifiers






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






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