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. Most calculations are normally performed by ______ statements.






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






3. The stream insertion operator






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






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






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






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






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






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






10. A filestream variable that represents the default input source






11. When it is not known in advance how many times a set of statements will be repeated a _________value can be used to terminate the repetition.






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






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






14. In inheritance the ____________ is the class the receives the inherited members.






15. A set of values together with a set of operations






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






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






18. Function ________ is used to produce random numbers.






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






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






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






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






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






24. Creates a copy of a string.






25. Naming convention for C++ programs






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






27. newline






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






29. The keyword ________ is used in a function header to indicate that a function does not return a value or to indicate that a function contains no parameters.






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






31. Used for dynamically allocated variables






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






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






34. A function that calls itself






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






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






37. Default name of executable file






38. Returns the length of a string excluding the null terminator.






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






40. An expression that has operands with different data types






41. tab






42. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors






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






44. In inheritance the ____________ is the class that supplies the inherited members.






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






46. Operator with only one operand






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






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






49. This manipulator causes the field to be left-justified with padding spaces printed to the right.






50. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.