1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
horsena [70]
3 years ago
11

Which of the following statements opens the file info.txt for both input and output? a) dataFile.open("info.txt", ios::in &&

amp; ios::out); b) dataFile.open("info.txt", ios::in , ios::out); c) dataFile.open("info.txt", input || output); d) dataFile.open("info.txt", ios::in | ios::out);
Computers and Technology
2 answers:
torisob [31]3 years ago
6 0

Answer:

D

Explanation: Choice D

azamat3 years ago
3 0

Answer:

Correct answer is D

Explanation:

open is a function in c++ programming language used to interact with files.The function takes two parameters as input

  1. File name
  2. mode

File Name

File name is a string name of file to be opened.This is a compulsory parameter for open method.

Mode

Mode is an optional parameter in open function.Following are the accepted values of mode parameter

Prefix ios:: is added to start of each

  1. in (Open file in input mode for writing data to file)
  2. out (Open file in output / read-only mode to read data from file)
  3. binary (Open file in binary format)
  4. ate (Set the starting point of file to the end of file. Default starting point of file is start of file)
  5. "trunc" (If file is opened multiple times all previous data is replaced with new data)
  6. app (All operations of output are performed the end of file)

Use | operator to use multiple modes at a time.

You might be interested in
How can people make sure they are using credit cards responsibly
Ray Of Light [21]
Set a buget based on monthly income
8 0
3 years ago
Read 2 more answers
Which type of page of replacement algorithm is Windows XP and Unix are using?
mel-nik [20]

Answer:

Windows XP uses the Local Page Replacement algorithm. It is a type of FIFO. In this, Pages are taken from processes using more than their minimum working set and Processes initialize with a default of 50 pages. XP monitors page fault rate and adjusts working set size accordingly.

UNIX uses the Global replacement Algorithm through Modified second-chance clock algorithm.  Here Pages are aged with each second and Pages that are not used for a long time will eventually have a value of zero.

7 0
4 years ago
Consider the following statements: #include #include class Temporary { private: string description; double first; double second;
Anna007 [38]

#include <iostream>  

#include <iomanip>  

using namespace std;  

class temporary  

{  

public:  

void set(string, double, double);  

void print();  

double manipulate ();  

void get (string&, double&, double&);  

void setDescription(string);  

void setFirst(double);  

void setSecond(double);  

string getDescription() const;  

double getFirst () const;  

double getSecond () const;  

temporary(string = "", double = 0.0, double = 0.0);  

private:  

string description;  

double first;  

double second;  

};  

void temporary::set(string a, double dblA, double dblB)  

{  

description = a;  

first = dblA;  

second = dblB;  

}  

void temporary::print()  

{  

cout << "\nDescription: " << left << setw(20) << description << endl <<  

" first: " << fixed << setw(10) << setprecision(2) << first << endl <<  

" second: " << fixed << setw(10) << setprecision(2) << second << endl;  

}  

double temporary::manipulate()  

{  

return first / 3.0 + second / 4.0;  

}  

void temporary::get(string& strDesc, double& dblFirst, double& dblSecond)  

{  

strDesc = description;  

dblFirst = first;  

dblSecond = second;  

}  

temporary::temporary(string d, double a, double b) : description(d), first(a), second(b) {}  

void temporary::setFirst(double dblFirst){first = dblFirst;}  

void temporary::setSecond(double dblSecond){second = dblSecond;}  

void temporary::setDescription(string desc){description = desc;}  

string temporary::getDescription() const {return description;}  

double temporary::getFirst () const{return first;}  

double temporary::getSecond () const {return second;}  

int main()  

{  

cout << "temporary a;";  

temporary a;  

a.print();  

cout << "a.setFirst(3.0): ";  

a.setFirst(3.0);  

a.print();  

cout << "a.setSecond(4.5): ";  

a.setSecond(4.5);  

a.print();  

cout << "a.setDescription(\"Picture Frame\") ";  

a.setDescription("Picture Frame");  

a.print();  

cout << "a.print(): ";  

a.print();  

return 0;  

}

6 0
4 years ago
Explain one way in which programmers may get hired.
ryzh [129]

Explanation:

I think you first get interviewed?

Then you get like a test and then have to explain it to the admission people on a whiteboard or something.

8 0
3 years ago
Charles would like to quickly find the name of the document he is currently working on. He should look at the _____. status bar
djyliett [7]
I believe it is the Status Bar.

Hope I helped
5 0
4 years ago
Read 2 more answers
Other questions:
  • To create a document, you start by selecting the _____ button or option.
    7·1 answer
  • Write a program that produces this output:
    10·1 answer
  • If you want a user to actively participate in an online activity, create a web ______________.
    12·2 answers
  • Although the traditional model of software acquisition still accounts for more software acquisition, a new model, called _______
    7·1 answer
  • Need answer Quick!!!!!
    10·1 answer
  • Mark is looking for a position in the IT field that best matches his qualifications. He has an associate degree in the field and
    6·1 answer
  • Which of the following best describes how to measure the spread of the data? a) The IQR is a better measure of spread for badmin
    5·1 answer
  • Identify an advantage of the software as a service (SaaS) approach in public cloud computing. Group of answer choices The user h
    5·1 answer
  • Which type of a computer can be assembled using a monitor, a keyboard, a cpu, speakers, a printer and a mouse?.
    14·1 answer
  • Sumit has created a procedure to draw a boat in Logo and saved it by the name, 'Boat'. Next day, when he tried to type the name
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!