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. To write data to a file you define an object of which one of the following






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






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






4. A function that calls itself






5. The symbol for the binary scope resolution operator






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






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






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






9. In inheritance the ____________ is the class the receives the inherited members.






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






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






12. Used for dynamically allocated variables






13. Creates a copy of a string.






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






15. An expression that has operands with different data types






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. The process of determining if an array contains a particular key value is called _________ the array.






18. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.






19. Naming convention for C++ programs






20. data types that refer to numbers with decimals






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






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






23. The sign you use for pointers






24. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________






25. Use 2 characters to represent one






26. Keyword public is a(n) _________






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






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






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






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






31. newline






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






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






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






35. A __________ should be used to declare the size of an array because it makes the program more scalable.






36. Most calculations are normally performed by ______ statements.






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






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






39. The idea that you can call the same function and the output will depend on the type of object you're using.






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






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






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






43. A function is invoked with a ________.






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






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






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






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






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






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






50. Allows the programmer to store a value in a variable