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. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.






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






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






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






5. Default name of executable file






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






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






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






9. A variable declared outside any block or function is a ________ variable.






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






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






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






13. The stream extraction operator






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






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






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






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






18. If a member initializer is not provided for a member object of a class the object's __________ is called.






19. The sign you use for references






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






21. directive A statement that starts with a # is called a ____________.






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






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






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






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






26. Operator with two operands






27. A filestream variable that represents the default input source






28. When you create a ___________________in the base class and then call it using an object the function will know to look in the inherited class for the specifics of that function.






29. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.






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






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






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






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






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






35. Type casting syntax






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






37. Syntax for named constant declaration






38. Classes can have relationships with other classes. These relationships are called ________.






39. Member objects are constructed __________ their enclosing class object.






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






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






42. Preprocessor directive syntax






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






44. Whole numbers - no decimals and no commas included






45. A recursive function typically has two components: One that provides a means for the recursion to terminate by testing for a(n) ________ case and one that expresses the problem as a recursive call for a slightly simpler problem than the original call






46. The symbol for the binary scope resolution operator






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






48. = & | are examples of ____________.






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






50. The ________ of an identifier is the portion of the program in which the identifier can be used.