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
Pick a web browser (a leading one or perhaps a lesser-known one that you use) and examine the Privacy and Security features and
Veseljchak [2.6K]

Solution :

<u>Chrome web browser</u>

The Chrome web browser uses a range of privacy and security settings for its customers. They include several security indicators as well as malware protection. Chrome uses the sandboxing technology, which prevents the harmful viruses and Trojans from reaching the computers.

Chrome provides a safe browsing by giving us an alert whenever we try to browse some harmful web sites.  It also warns you if we use a username and password combination which has been compromised in any data leak.

Chrome also serves to protect the individuals :

It provides a features of Ad blocking.

When we want to browse safely without being recognized or without storing any credentials, Chrome provides an Incognito mode.

Many businesses can be done on the internet using Chrome platform that is safe and authenticate to gather and collect data and information.

3 0
3 years ago
Which of the following STEM discoverers is known as the “Prince of Math?”
Margarita [4]
The German mathematician & physicist ”Carl Friedrich Gauss”

Born: April 30, 1777, Brunswick, Germany
Died: February 23, 1855, Göttingen, Germany
8 0
3 years ago
What type of video games do you prefer buying?
Tamiku [17]
Mine is minecraft maybe
6 0
3 years ago
The undo function allows the user to cancel up to _____ previous typing actions.
GalinKa [24]
C 20 previous typing actions
4 0
3 years ago
When you store files "in the cloud", you are __________.<br><br> I kinda need the answer now
Angelina_Jolie [31]
Putting them online? what are the answers to choose from?
7 0
3 years ago
Other questions:
  • Balance is the design principle that is represented when using the Crop tool?
    6·1 answer
  • ________ is a model of computing in computer processing, storage, software, and other services which are provided as a shared po
    9·1 answer
  • What happens when two computers use the same IP address?
    15·1 answer
  • Lifelong learning _____. is only important for professionals with advanced degrees can be formal or informal includes formal cla
    12·1 answer
  • What mistake might you make related to changing the data in a cell that's used in a formula?
    14·1 answer
  • A university with remote campuses, which all use different service providers, loses Internet connectivity across all locations.
    12·1 answer
  • Why is it important to isolate evidence-containing devices from the internet?
    11·1 answer
  • What will the "background-color" of the "topButton" be when the program is finished running?
    10·1 answer
  • Why is it important to identify cables and conductors?​
    9·1 answer
  • There is a group of 10 people who are ordering pizza. If each person gets 2 slices and each pizza has 5 slices, how many pizzas
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!