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. Message displayed to the screen asking user for input; generated with an output statement






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






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






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






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






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






7. Causes the program to immediately goes back to the top of the loop. the remainder of the statements in the loop are ignored for this current iteration.






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






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






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






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






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






13. The stream insertion operator






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






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






16. Used for function calls and local variables






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






18. * / % + -






19. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.






20. The sign you use for pointers






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






22. The sign you use for references






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






24. Default name of executable file






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






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






27. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.






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






29. data types that refer to numbers with decimals






30. = & | are examples of ____________.






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






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






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






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






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






36. Creates a copy of a string.






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






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






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






40. Function ________ is used to produce random numbers.






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






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






43. A pointer is a variable that contains as its value the____________ of another variable.






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






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






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






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






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






49. Whole numbers - no decimals and no commas included






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