Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The control statement which is best used when you need to choose which statements to execute from among any choices, and the condition for selection

image text in transcribed

The control statement which is best used when you need to choose which statements to execute from among any choices, and the condition for selection can be expressed as some expression is not necessarily integer? The control statement which is best used when you want to repeat a group of statements over and over based a condition and the statements in the loop body must be executed at least once is the? Use the following program SEGMENT to answer the next two questions int I, J; for (I = 2; I >= 0; I--) {for(J = 1; J #include #include #include Which of the following statements correctly declares the input file object MyInput and initializes the file object to read the file exam.txt? ifstream MyInput("exam.txt"); MyInput ifstream("exam.txt"); ifstream MyInput(exam.txt); What is the next step in using a file, after the file has been declared with the following? ofstream AnsFile; You use the file to input a variable. You use the file by outputting a value to it. You search for a file named AnsFile. You open the file, and associate it with a specific file name. Which of the following statements correctly opens the output file object AnsFile to store answers into file myanswers.txt ? AnsFile.open("myanswers.txt"); open.AnsFlle("myanswers.txt"); open.AnsFile(myanswers.txt); AnsFile.open(myanswers.txt); Which statement will properly store the number from variable value into the output file object AnsFile? AnsFile > value; Mylnput >> cin >> value; cin >> MyInput >> value; value = read.MyInpu(); Which of the following statements will close the output file object AnsFile from the previous question(20)? close-AnsFile; "myanswers.txt".close; AnsFile.close(); AnsFile.close("myanswers.txt"); Which repetition constructs will property repeat the loop body while not at the end-of-file for input file object Datafile while(! DataFile) while (! eof()) while (! DataFile.eof()) while (! eof.DataFile()) The argument and parameters must agree in number, and identifier name. must agree in data type and identifier name. must agree in number and order. In the following function prototype: int fun1(double& Num1, double& Num 2); Function fun1 can modify the arguments passed to both Num1 and Num2 Function fun1 can not modify the arguments passed to Num1 and Num2 Function fun1 can only modify the argument passed to Num1 Function fun1 can only modify the argument passed to Num2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro Database Migration To Azure Data Modernization For The Enterprise

Authors: Kevin Kline, Denis McDowell, Dustin Dorsey, Matt Gordon

1st Edition

1484282299, 978-1484282298

More Books

Students also viewed these Databases questions