Question: Consider the following declarations: Ifstream datain; Ofstream dataout What statement is valid to open an output file named output.txt? Output.txt.open (ofstream); Ofstream.open (output,txt); Output.open (dataOut);

  1. Consider the following declarations:

Ifstream datain;

Ofstream dataout

What statement is valid to open an output file named output.txt?

  1. Output.txt.open (ofstream);
  2. Ofstream.open (output,txt);
  3. Output.open (dataOut);
  4. dataOut.open (output.txt);
  1. Suppose num1 and num2 are int variable and symbol is a char variable. Consider the following input 35 24 $ A. what value (if any) is assigned to num1, num2, and symbol after statement executes? Cin >> num1>>symbol>>num2;
    1. Num1=35, symbol is assigned a whitespace, num2=24
    2. Num1=35, symbol = 24, num2 = $
    3. Num1=35, symbol 2, num2 = 4
  2. Which header file must be included to use the manipulators fixed and showpoint? (Hint: these 2 manipulators do not require any parameter)
  1. Iomanip
  2. Cmath
  3. iostream
  1. In which of the following statements the computer doesnt have to evaluate the right (2nd) expression (due to short-circuit evaluation)?
  1. (15>=16) || (A==A)
  2. (15>=16)&&(A==A)
  3. (16>=15)&&(A==B)
  4. (16,15) || (A==B)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!