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. This manipulator is used to establish a field width for the value immediately following it.






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






3. Preprocessor directive syntax






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






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






6. The modulus operator (%) can be used only with __________.






7. The stream extraction operator






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






9. The ________ of an identifier is the portion of the program in which the identifier can be used.






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






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






12. The sign you use for references






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






14. To explicitly indicate that a value is to be converted to another type






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






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






17. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.






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






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






20. A filestream variable that represents the default input source






21. The process of analyzing and designing a system from an object-oriented point of view is called ________.






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






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






24. int namespace include using return examples of ___________






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






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






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






28. * / % + -






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






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






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






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






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






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






35. A function that calls itself






36. Type casting syntax






37. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line


38. Function ________ is used to produce random numbers.






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






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






41. Operator with two operands






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






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






44. Whole numbers - no decimals and no commas included






45. Executable version of program






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






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






48. The __________ operator reclaims memory previously allocated by new.






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






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