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. You can declare default values for a function in the ____________________.






2. Used for dynamically allocated variables






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






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






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






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






7. Preprocessor directive syntax






8. An expression that has operands with different data types






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






10. Naming convention for C++ programs






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






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






13. * / % + -






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






15. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.






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






17. = & | are examples of ____________.






18. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.






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






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






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






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






23. Function ________ is used to produce random numbers.






24. Class members specified as _________ are accessible anywhere an object of the class is in scope.






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






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






27. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.






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






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. Used to qualify hidden names so that they can be used.






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






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






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






34. The stream insertion operator






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






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






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






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






39. The storage-class specifiers are mutable - auto - ________ - extern and static.






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






41. data types that refer to numbers with decimals






42. All C++ Variables are_________.






43. Default name of executable file






44. int namespace include using return examples of ___________






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






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






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






48. Forces the computer to display decimal point and trailing zeroes






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






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