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);
- 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);
- dataOut.open (output.txt);
- 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;
- Num1=35, symbol is assigned a whitespace, num2=24
- Num1=35, symbol = 24, num2 = $
- Num1=35, symbol 2, num2 = 4
- Which header file must be included to use the manipulators fixed and showpoint? (Hint: these 2 manipulators do not require any parameter)
- Iomanip
- Cmath
- iostream
- In which of the following statements the computer doesnt have to evaluate the right (2nd) expression (due to short-circuit evaluation)?
- (15>=16) || (A==A)
- (15>=16)&&(A==A)
- (16>=15)&&(A==B)
- (16,15) || (A==B)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
