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. A variable that is known only within the function in which it is defined is called a ________.






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






3. Type casting syntax






4. Creates a copy of a string.






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






6. A filestream variable that represents the default output device






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






8. The symbol for the binary scope resolution operator






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






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






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






12. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.






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






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






15. The ________ qualifier is used to declare read-only variables.






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






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






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






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






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






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






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






23. A sequence of operands and operators that describe a calculation to be performed






24. Header file that contains commonly performed mathematical functions






25. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________






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






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






28. The stream insertion operator






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






30. data types that refer to numbers with decimals






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






32. Used for function calls and local variables






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






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






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






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






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






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






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






40. A function is invoked with a ________.






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






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






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






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






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






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






47. Syntax for named constant declaration






48. The sign you use for pointers






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






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