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. Preprocessor directive syntax






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






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






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






5. An expression that has operands with different data types






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






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






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






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






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






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






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






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






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






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






16. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .






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






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






19. Use 2 characters to represent one






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






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






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






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






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






25. Naming convention for C++ programs






26. Associate an identifier with a memory location






27. data types that refer to numbers with decimals






28. newline






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






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






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






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






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






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. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.






36. Words that are used for special purposes in a program






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






38. Initializers __________ must be used to initialize constant members of a class.






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






40. Operator with two operands






41. A variable that holds the address of another variable.






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






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






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






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






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






47. The sign you use for references






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






49. A function is invoked with a ________.






50. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.