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
JAVA
butalik [34]

Answer:

import java.util.*;

public class MyClass {

   public static void main(String args[]) {

       Scanner input = new Scanner(System.in);

       System.out.print("Input a word: ");

       String userinput = input.nextLine();

       for(int i =0;i<userinput.length();i+=2) {

           System.out.print(userinput.charAt(i));

       }

   }

}

Explanation:

This line prompts user for input

       System.out.print("Input a word: ");

This declares a string variable named userinput and also gets input from the user

       String userinput = input.nextLine();

The following iterates through every other character of userinput from the first using iteration variable i and i is incremented by 2

       for(int i =0;i<userinput.length();i+=2) {

This prints characters at i-th position

           System.out.print(userinput.charAt(i));

5 0
3 years ago
Q1. Information systems that monitor the elementary activities and transactions of the organizations are: I a. Management-level
VashaNatasha [74]

Answer:

B. Operational-level systems monitor the elementary activities and transactions of the organization.

6 0
2 years ago
How can ICTs be used in the workplace to improve the way employees
nadezda [96]

Answer:

it allows them to work more efficiently, with fewer waisted resources

Explanation:

3 0
3 years ago
True / False<br> Generally, more orthogonal instruction sets are considered less elegant.
Cerrena [4.2K]

Answer: True

Explanation:Orthogonal instruction set is the set of instruction that can use can use all addressing mode. They have independent working and so instruction can use any register the prefer and this leads to overlapping in instruction and complexity.

When RISC architecture got introduced ,it got more preference due to reduced instruction and less complexity as compared to orthogonal instruction.So it not considered elegant to have more orthogonal instruction.

6 0
3 years ago
Christopher is part of a film production. His job is to analyze the movie script and create a shooting schedule. What is Christo
Oksi-84 [34.3K]
I am pretty sure he would be the production manager
3 0
3 years ago
Read 2 more answers
Other questions:
  • What dose it need For a device to be considered a kind of computer
    14·2 answers
  • From the Start screen, you can A. access recently opened Excel workbooks. B. create a document from a template. C. create new bl
    12·2 answers
  • A user found that their personal data had been exfiltrated from their computer by a malicious program that they clicked on sever
    12·1 answer
  • When a JSP page is compiled, what is it turned into?
    11·1 answer
  • What is your favourite video game??​
    5·2 answers
  • What is the purpose of the "time-to-live" (TTL) field of the IPv4 packet? a. ensures that the packet remains in the network long
    6·1 answer
  • A label control may be added to a form by double-clicking on the Label control icon in the ________ window.
    15·1 answer
  • Anybody wants to join my pad let to talk about video games
    7·2 answers
  • a FOR loop that will draw 3 circles with a radius of 20 exactly 50 points apart in a vertical line. the first points should be (
    7·1 answer
  • ....is an act of introducing an invention into market on business basis for profit​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!