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 symbol for the binary scope resolution operator






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






3. Naming convention for C++ programs






4. Function ________ is used to set the random number seed to randomize a program.






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






6. OOD also takes advantage of ________ relationships where new classes of objects are derived by absorbing characteristics of existing classes - then adding unique characteristics of their own.






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






8. A function ________ enables a single function to be defined to perform a task on many different data types.






9. The storage-class specifiers are mutable - auto - ________ - extern and static.






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






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






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






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






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






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






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






17. A filestream variable that represents the default output device






18. A filestream variable that represents the default input source






19. The ________ program transfers the executable image of a C++ program from disk to memory.






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






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






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






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. Use 2 characters to represent one






25. The three values that can be used to initialize a pointer are 0 - __________ and an address.






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






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






28. Whole numbers - no decimals and no commas included






29. The ________ statement in a called function passes the value of an expression back to the calling function.






30. All C++ Variables are_________.






31. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.






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






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






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






35. The stream insertion operator






36. All ______ must be declared before they are used.






37. tab






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






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






40. The stream extraction operator






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






42. Creates a copy of a string.






43. Objects have the property of ________although objects may know how to communicate with one another across well-defined interfaces - they normally are not allowed to know how other objects are implemented.






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






45. Keyword public is a(n) _________






46. The address-of operator. it is used to assign pointers and to print the address of variables.






47. Preprocessor directive syntax






48. Syntax for named constant declaration






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






50. To write data to a file you define an object of which one of the following