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. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.






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






3. The stream extraction operator






4. Classes can have relationships with other classes. These relationships are called ________.






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






6. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .






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






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






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






10. Keyword public is a(n) _________






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






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






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






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






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






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






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






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






19. You can declare default values for a function in the ____________________.






20. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.






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






22. A recursive function typically has two components: One that provides a means for the recursion to terminate by testing for a(n) ________ case and one that expresses the problem as a recursive call for a slightly simpler problem than the original call






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






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






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






26. tab






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






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






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






30. The address-of operator. it is used to assign pointers and to print the address of variables.






31. Used for dynamically allocated variables






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






33. Associate an identifier with a memory location






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






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






36. Initializers __________ must be used to initialize constant members of a class.






37. An expression in which all operands have the same data type - result will have the same data type as operands






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






39. data types that refer to numbers with decimals






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






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






42. Words that are used for special purposes in a program






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






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






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






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






47. = & | are examples of ____________.






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






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






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