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 ________ program executes before the compiler's translation phase begins.






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






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






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






5. tab






6. A function is invoked with a ________.






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






8. Symbol that denotes an action to be performed






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






10. Repeating a set of instructions a specific number of times is called_________repetition.






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






12. For a local variable in a function to retain its value between calls to the function it must be declared with the ________ storage-class specifier.






13. The symbol for the binary scope resolution operator






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






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






16. A filestream variable that represents the default input source






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






18. The elements of an array are related by the fact that they have the same name and ___________.






19. Header file that contains commonly performed mathematical functions






20. Objects have the property of ________although objects may know how to communicate with one another across well-defined interfaces - they normally are not allowed to know how other objects are implemented.






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






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






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






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






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






26. Naming convention for C++ programs






27. Used for function calls and local variables






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






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






30. A memory location with a name and data type - its content may be changed during program execution






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






32. Creates a copy of a string.






33. The sign you use for references






34. Member objects are constructed __________ their enclosing class object.






35. Syntax for named constant declaration






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






37. An operator that can only be used with int values. result will always be an int.






38. You must have a ___________ for every variable you intend to use in a program






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






40. All ______ must be declared before they are used.






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






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






43. The sign you use for pointers






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






45. A function ________ enables a single function to be defined to perform a task on many different data types.






46. Default name of executable file






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






48. Associate an identifier with a memory location






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






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