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. Used for dynamically allocated variables






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






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






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






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






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






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






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






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






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






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






12. The ________ of an identifier is the portion of the program in which the identifier can be used.






13. C++ programs are normally typed into a computer using a(n) ________ program.






14. A variable that is known only within the function in which it is defined is called a ________.






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






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






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






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






19. Default name of executable file






20. A filestream variable that represents the default output device






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






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






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






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






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






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






27. Header file that contains commonly performed mathematical functions






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






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






30. The symbol for the binary scope resolution operator






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






32. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.






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






34. * / % + -






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






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






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






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






39. int namespace include using return examples of ___________






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






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






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






43. newline






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






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






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






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






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






49. Whole numbers - no decimals and no commas included






50. Class members specified as _________ are accessible only to member functions of the class and friends of the class.