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. A file must be ________ before data can be written to or read from it.






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






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






5. Operator with only one operand






6. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.






7. Nonexecutable statements that are included in a program to provide information about what the program does etc.






8. int namespace include using return examples of ___________






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






10. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.






11. Whole numbers - no decimals and no commas included






12. Naming convention for C++ programs






13. This is used to mark the end of a complete C++ programming statement.






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






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






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






17. The stream extraction operator






18. Header file that contains commonly performed mathematical functions






19. = & | are examples of ____________.






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






21. data types that refer to numbers with decimals






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






23. Executable version of program






24. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.






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






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






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






28. Smallest individual unit of a programming language - special symbols or word symbols or identifiers






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






30. Type casting syntax






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






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






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






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






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






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






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






38. tab






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






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






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






42. Characters used to separate symbols or reserved words or identifiers and statements






43. Preprocessor directive syntax






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






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






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






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






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






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






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