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
You have several reference computers. The computers are configured to always start from a local hard disk drive. You plan to cap
aivan3 [116]

Answer:

it is C.

Explanation:

3 0
3 years ago
In what ways can information be slanted in a news report?
ratelena [41]

Answer:It all depends on who the reader is likely to be and the information they’ll want.

Explanation:

Newspaper 1: Company wins contract

Newspaper 2: Previous company loses contract (equally true)

Newspaper 3, say a student paper in the local town: Prospects for new jobs open up as company wins contract.

8 0
1 year ago
ZeroIt is a function that takes one argument and returns no value. The argument is a pointer to int. The function stores the val
Sedbober [7]

Answer:

zeroIt(&x);

Explanation:

The statement that sets the value stored in x to zero by invoking the function zerolt is given below

zeroIt(&x);

The zeroIt function is also given below for better understanding.

void zeroIt(int *x) {

   *x = 0;

}

As seen, the function takes an argument with integer variable type, which is a pointer, denoted by the asterisk symbol (*x).

The ampersan sign (&x) is used to access the variable whose value can then be stored.

7 0
3 years ago
What does the % find
Sever21 [200]

Answer:

The FIND function returns the position (as a number) of one text string inside another. If there is more than one occurrence of the search string, FIND returns the position of the first occurrence. FIND does not support wildcards, and is always case-sensitive.

Explanation:

4 0
2 years ago
The concept that allows certain professions to use copyrighted material without permission in their work is called _____.
lesantik [10]
C) fair use

Hope this helps... mark as Brainliest plz
4 0
3 years ago
Other questions:
  • Advantages of a personal area network
    5·1 answer
  • Weber believed that there is an inevitable destructive quality to which one of the four types of action?
    8·1 answer
  • Unit 3 Computer Programming Study Guide
    6·1 answer
  • Spoken word and written word are different because what
    9·1 answer
  • Retrieve the names of employees who work on exactly one project that is controlled by their department. (It does not matter how
    7·1 answer
  • Create a do-while loop that asks the user to enter two numbers. The numbers should be added and the sum displayed. The loop shou
    5·1 answer
  • 2. What is the name for an action performed by the VR Robot?
    7·2 answers
  • Supplies/material used in iron​
    11·1 answer
  • Describe all the steps a router goes through while deciding where to send the a packet. Explain why a router would choose one ro
    7·1 answer
  • I have all of the points and brainliest, but it won't level up, I don't know why, anyone know why?
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!