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. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')






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






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






4. Used for function calls and local variables






5. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.






6. tab






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






8. A function that can be used to read character data including whitespace






9. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.






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






11. An array that uses two subscripts is referred to as a(n) _________ array.






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






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






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






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






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






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






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






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






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






21. Naming convention for C++ programs






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






23. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution






24. Use 2 characters to represent one






25. data types that refer to numbers with decimals






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






27. A________ allows the compiler to check the number & types and order of the arguments passed to a function.






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






29. Preprocessor directive syntax






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






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






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






33. Function ________ is used to produce random numbers.






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






35. Creates a copy of a string.






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






37. A function that calls itself






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






39. The only integer that can be assigned directly to a pointer is_____________.






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






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






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






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






44. Most calculations are normally performed by ______ statements.






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






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






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






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






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






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