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. Class members specified as _________ are accessible anywhere an object of the class is in scope.






2. The sign you use for pointers






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






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






5. The __________ operator reclaims memory previously allocated by new.






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






7. Two slash marks ( // ) indicate __________ of a comment






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






9. Used for dynamically allocated variables






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






11. Keyword public is a(n) _________






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






13. Used for function calls and local variables






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






15. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.






16. The size & shape & color and weight of an object are considered






17. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.






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






19. The stream insertion operator






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






21. The ________ enables access to a global variable with the same name as a variable in the current scope.






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






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






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






25. Header file that contains commonly performed mathematical functions






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






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






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






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






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






31. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.






32. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.






33. newline






34. When a value of one data type is implicitly (automatically) changed to another data type






35. You can declare default values for a function in the ____________________.






36. The stream extraction operator






37. The only integer that can be assigned directly to a pointer is_____________.






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






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






40. The symbol for the binary scope resolution operator






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






42. Executable version of program






43. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.






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






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






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






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






48. = & | are examples of ____________.






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






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