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. In inheritance the ____________ is the class the receives the inherited members.






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






3. directive A statement that starts with a # is called a ____________.






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






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






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






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. An operator that can only be used with int values. result will always be an int.






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






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






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






12. A program that finds and attaches to your program the indicated libraries for compilation






13. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.






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






15. The address-of operator. it is used to assign pointers and to print the address of variables.






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






17. Syntax for named constant declaration






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






19. int namespace include using return examples of ___________






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






21. Associate an identifier with a memory location






22. A function is invoked with a ________.






23. tab






24. * / % + -






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






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






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






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






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






30. Header file that contains commonly performed mathematical functions






31. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.






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






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






34. Lists and tables of values can be stored in arrays or __________.






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






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






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






38. A C++ statement that makes a decision is ______.






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






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






41. For a local variable in a function to retain its value between calls to the function it must be declared with the ________ storage-class specifier.






42. A __________ data member represents class-wide information.






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






44. A filestream variable that represents the default input source






45. All C++ Variables are_________.






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






47. Type casting syntax






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






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






50. Forces the computer to display decimal point and trailing zeroes