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 human readable file that contains C++ program






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






3. * / % + -






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






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






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






7. An expression that has operands with different data types






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

Warning: Invalid argument supplied for foreach() in /var/www/html/basicversity.com/show_quiz.php on line 183


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






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






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






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






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






14. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.






15. = & | are examples of ____________.






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






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






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






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






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






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






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






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






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






25. The stream insertion operator






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






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






28. The three ways to return control from a called function to a caller are ________ - return expression and encounter.






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






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






31. A function that calls itself






32. Words that are used for special purposes in a program






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






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






35. The stream extraction operator






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






37. A filestream variable that represents the default output device






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






39. Initializers __________ must be used to initialize constant members of a class.






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






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






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






43. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.






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






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






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






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






48. Executable version of program






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






50. The sign you use for pointers