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 holds the address of another variable.






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






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






4. A function that calls itself






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






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






7. = & | are examples of ____________.






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






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






10. Function ________ is used to produce random numbers.






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






12. Default name of executable file






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






14. A filestream variable that represents the default input source






15. Symbol that denotes an action to be performed






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






17. Used for dynamically allocated variables






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






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






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






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






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






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






24. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.






25. The sign you use for references






26. The sign you use for pointers






27. Header file that contains commonly performed mathematical functions






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






29. Used for function calls and local variables






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






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






32. The _____ causes the contents of another file to be inserted into a program.






33. Naming convention for C++ programs






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






35. Whole numbers - no decimals and no commas included






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






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






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






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






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






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






42. The conditional operator. it evaluates a line of code and returns one thing if the condition is true and a different thing if the condition is false.






43. The process of placing the elements of an array in order is called ________ the array.






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






45. Syntax for named constant declaration






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






47. Operator with two operands






48. A function is invoked with a ________.






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






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