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. Classes can have relationships with other classes. These relationships are called ________.






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






3. Syntax for named constant declaration






4. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.






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






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






7. The stream insertion operator






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






9. Operator with two operands






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






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






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






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






14. Symbol that denotes an action to be performed






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






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






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






18. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.






19. The keyword ________ is used in a function header to indicate that a function does not return a value or to indicate that a function contains no parameters.






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






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






22. A pointer is a variable that contains as its value the____________ of another variable.






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






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






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






26. Associate an identifier with a memory location






27. Class members are accessed via the ________ operator in conjunction with the name of an object (or reference to an object) of the class or via the arrow (->) operator in conjunction with a pointer to an object of the class.






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






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






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






31. int namespace include using return examples of ___________






32. Preprocessor directive syntax






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






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






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






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






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






38. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.






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






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






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






42. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time






43. Every C++ statement ends with a(n) _________.






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






45. The stream extraction operator






46. * / % + -






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






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






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






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