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. A pointer is a variable that contains as its value the____________ of another variable.






2. Preprocessor directive syntax






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






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






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






6. Syntax for named constant declaration






7. A filestream variable that represents the default output device






8. The stream insertion operator






9. Nonexecutable statements that are included in a program to provide information about what the program does etc.






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






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






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






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






14. tab






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






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






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

Warning: Invalid argument supplied for foreach() in /var/www/html/basicversity.com/show_quiz.php on line 183


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






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






20. Use 2 characters to represent one






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






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






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






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






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






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






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






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






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






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






31. Keyword public is a(n) _________






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






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






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






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






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






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






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






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






40. A filestream variable that represents the default input source






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






42. Class members specified as _________ are accessible anywhere an object of the class is in scope.






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






44. Returns the length of a string excluding the null terminator.






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






46. Whole numbers - no decimals and no commas included






47. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.






48. The _________ begins the body of every function and the _________ ends the body of every function.






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






50. A function that calls itself