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. Syntax for named constant declaration






2. A filestream variable that represents the default input source






3. Naming convention for C++ programs






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






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






6. = & | are examples of ____________.






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






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






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






10. An expression that has operands with different data types






11. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.






12. Use 2 characters to represent one






13. A filestream variable that represents the default output device






14. Function ________ is used to produce random numbers.






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






16. Used for dynamically allocated variables






17. Type casting syntax






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






19. The stream insertion operator






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






21. A function that calls itself






22. The process of analyzing and designing a system from an object-oriented point of view is called ________.






23. Preprocessor directive syntax






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






25. Identifier or expression that is part of the calculation to be performed






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






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






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






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






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






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






32. Compares two strings and returns 0 if they are equal.






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






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






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






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






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






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






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






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






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






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






43. The escape sequence ___ when output with cout and the stream insertion operator - causes the cursor to position to the beginning of the next line on the screen.






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






45. The stream extraction operator






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


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






48. Every C++ program begins execution at the function _________.






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






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