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. Every C++ statement ends with a(n) _________.






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






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






4. Used for function calls and local variables






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






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






7. This manipulator is used to establish a field width for the value immediately following it.






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






9. Operator with two operands






10. A type of pointer that can point at objects of any data type.






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






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






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






14. The modulus operator (%) can be used only with __________.






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






16. An expression that has operands with different data types






17. * / % + -






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






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






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






21. Syntax for named constant declaration






22. The ________ statement in a called function passes the value of an expression back to the calling function.






23. Used to qualify hidden names so that they can be used.






24. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.






25. Associate an identifier with a memory location






26. Default name of executable file






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






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






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






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






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






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






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






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






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






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






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






38. The sign you use for references






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






40. A human readable file that contains C++ program






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






42. When a value of one data type is implicitly (automatically) changed to another data type






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






44. A function is invoked with a ________.






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






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






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






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






49. Class members are accessed via the ________ operator in conjunction with the name of an object (or reference to an object) of the class or via the arrow (->) operator in conjunction with a pointer to an object of the class.






50. int namespace include using return examples of ___________