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. Used for dynamically allocated variables






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






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






4. Repeating a set of instructions a specific number of times is called_________repetition.






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






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






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






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






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






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






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






12. All C++ Variables are_________.






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






14. newline






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






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






17. Symbol that denotes an action to be performed






18. The sign you use for pointers






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






20. A function that calls itself






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






22. Whole numbers - no decimals and no commas included






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






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






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






26. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.






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






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






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






30. Syntax for named constant declaration






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






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






33. Use 2 characters to represent one






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






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






36. Keyword public is a(n) _________






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






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






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






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






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






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






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






44. * / % + -






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






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






47. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')






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






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






50. A pointer is a variable that contains as its value the____________ of another variable.