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. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.






2. * / % + -






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






4. newline






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






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






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






8. int namespace include using return examples of ___________






9. Most calculations are normally performed by ______ statements.






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






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






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






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






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






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






16. Used for function calls and local variables






17. Identifier or expression that is part of the calculation to be performed






18. The idea that you can call the same function and the output will depend on the type of object you're using.






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






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






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






22. Objects have the property of ________although objects may know how to communicate with one another across well-defined interfaces - they normally are not allowed to know how other objects are implemented.






23. A filestream variable that represents the default input source






24. Header file that contains commonly performed mathematical functions






25. Executable version of program






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






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






28. Nonexecutable statements that are included in a program to provide information about what the program does etc.






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






30. A function that calls itself






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






32. Default name of executable file






33. These are data items whose values do not change while the program is running






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






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






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






38. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.






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






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






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






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






43. Whole numbers - no decimals and no commas included






44. A __________ should be used to declare the size of an array because it makes the program more scalable.






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






46. The stream insertion operator






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






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






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






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






Can you answer 50 questions in 15 minutes?



Let me suggest you:



Major Subjects



Tests & Exams


AP
CLEP
DSST
GRE
SAT
GMAT

Most popular tests