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. Nonexecutable statements that are included in a program to provide information about what the program does etc.






2. A function is invoked with a ________.






3. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.






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






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






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






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






8. Used for function calls and local variables






9. The ________ program combines the output of the compiler with various library functions to produce an executable image.






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






11. Keyword public is a(n) _________






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






13. Symbol that denotes an action to be performed






14. The symbol for the binary scope resolution operator






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






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






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






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






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






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






21. Function ________ is used to produce random numbers.






22. The stream insertion operator






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






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






25. These are data items whose values do not change while the program is running






26. To allow file access in a program you must #include this header file.






27. Preprocessor directive syntax






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






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






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






31. All C++ Variables are_________.






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






33. The ________ qualifier is used to declare read-only variables.






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






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






36. A function that calls itself either directly or indirectly - through another function) - is a ________ function.






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






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






39. Syntax for named constant declaration






40. Operator with two operands






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






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






43. Operator with only one operand






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






45. The sign you use for references






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






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






48. A ________ program executes before the compiler's translation phase begins.






49. int namespace include using return examples of ___________






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