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. The elements of an array are related by the fact that they have the same name and ___________.






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






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






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






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






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






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






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






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






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






11. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.






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






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






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






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






16. The stream insertion operator






17. Executable version of program






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






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






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






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






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






23. A filestream variable that represents the default input source






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






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






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






27. Header file that contains commonly performed mathematical functions






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






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






30. Program components in C++ are called functions and ________.






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






32. Class members specified as _________ are accessible only to member functions of the class and friends of the class.






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






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






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






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






37. Whole numbers - no decimals and no commas included






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






39. int namespace include using return examples of ___________






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






41. tab






42. __________ can be used to assign an object of a class to another object of the same class.






43. A function is invoked with a ________.






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






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






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






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






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






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






50. All C++ Variables are_________.