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. Compares two strings and returns 0 if they are equal.






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






3. newline






4. An array that uses two subscripts is referred to as a(n) _________ array.






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






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






7. Associate an identifier with a memory location






8. Causes the program to immediately goes back to the top of the loop. the remainder of the statements in the loop are ignored for this current iteration.






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






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






11. Every C++ statement ends with a(n) _________.






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






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






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






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






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






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






18. The _____ causes the contents of another file to be inserted into a program.






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






20. A filestream variable that represents the default output device






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






22. data types that refer to numbers with decimals






23. A file must be ________ before data can be written to or read from it.






24. The process of determining if an array contains a particular key value is called _________ the array.






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






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






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






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






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






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






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






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






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






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






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






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






37. A variable that holds the address of another variable.






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






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






40. tab






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






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






43. Function ________ is used to produce random numbers.






44. OOD also takes advantage of ________ relationships where new classes of objects are derived by absorbing characteristics of existing classes - then adding unique characteristics of their own.






45. Default name of executable file






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






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






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






49. These are data items whose values do not change while the program is running






50. A________ allows the compiler to check the number & types and order of the arguments passed to a function.