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. A member function should be declared static if it does not access __________ class members.






2. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line


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






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






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






6. Used for function calls and local variables






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






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






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






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






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






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






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






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






15. A variable that is known only within the function in which it is defined is called a ________.






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






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






18. The stream insertion operator






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






20. The sign you use for pointers






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






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






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






24. An operator that can only be used with int values. result will always be an int.






25. A filestream variable that represents the default output device






26. Naming convention for C++ programs






27. Grammar rules of the language; compiler will try to identify and locate syntax errors






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






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






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






31. * / % + -






32. Symbol that denotes an action to be performed






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






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






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






36. An expression that has operands with different data types






37. The sign you use for references






38. Header file that contains commonly performed mathematical functions






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






40. tab






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






42. The symbol for the binary scope resolution operator






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






44. Class members specified as _________ are accessible anywhere an object of the class is in scope.






45. Forces the computer to display decimal point and trailing zeroes






46. Smallest individual unit of a programming language - special symbols or word symbols or identifiers






47. A function that calls itself






48. Use 2 characters to represent one






49. Operator with only one operand






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