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
Ludmilka [50]
2 years ago
14

Suppose that outFileis an ofstreamvariable and output is to be stored in the file outputData.out. Which of the following stateme

nts opens the file outputData.outand associates outFileto the output file?
a.outFile("outputData.out");
b.outFile.open("outputData.out");
c.open(outFile,"outputData.out");
d.open.outFile("outputData.out");
Computers and Technology
1 answer:
BlackZzzverrR [31]2 years ago
5 0

Answer:

Option b outFile.open("outputData.out");

Explanation:

In C++, there are several classes given to handle output and input of characters to or from files. They are:

  • ofstream that write on files
  • ifstream that read from files

We can use an object of ofstream to hold the contents that we wish to output to an external file. The general syntax is as follows:

           ofstream_obj.open(file_name)

This will create a file with a specific file name and it possesses all the contents from the obstream_obj.

You might be interested in
A user complains that the pointer movement on his laptop computer is very erratic what should you do?
Nadusha1986 [10]

Answer:

just go to mouse settings click additional mouse settings and you can go to a speed tab to chance pointer speed. its probably set to a higher setting than what he normally uses

Explanation:

8 0
2 years ago
Mary is troubleshooting her company's LAN network. She finds out that data segments that the client is encoding are resulting in
kicyunya [14]

Answer:

Data link layer of OSI model is creating the erroneous segments

Explanation:

The Open System Interconnection (OSI) model is a conceptual framework about how communication occurs between devices over the Internet. It has seven layers, (Physical, Data, Network, Transport, Session, Presentation and Application layer). The purpose of this hierarchical layer system is to understand the structure of communication between devices and do troubleshooting easily if a fault occurs. As in this question, Marry is troubleshooting her company LAN network. She finds out that data segments that the client is encoding are resulting in errors in the encoding. Now the question arises, how she found the cause of the error. The OSI model helps her in understanding the problem.

As you know, the data link layer of the OSI model is responsible for the encoding and decoding of data segments. This layer ensures the reliability of the physical layer, and responsible to provide error-free transfer of data from one node to another on a network. It is also responsible for frame synchronization and flow control. The data link layer is divided into sub-layers:

1. Media Access Control Layer: this layer controls how a computer on the network gains access to the data and transmission permission.

2. Logical Link Control Layer: This layer controls frame synchronization, error checking and flow control.

Therefore, Marry founds data link layer of the OSI model is creating the erroneous segments in encoding.

6 0
3 years ago
A poker hand consists of 5 cards drawn at random without replacement from a 52 card deck. Using python and the cards data frame
PSYCHO15rus [73]

Answer:

# Python program to shuffle a deck of card

# importing modules

import itertools, random

# make a deck of cards

deck = list(itertools.product(range(1,14),['Spade','Heart','Diamond','Club']))

# shuffle the cards

random.shuffle(deck)

# draw five cards

print("You got:")

for i in range(5):

  print(deck[i][0], "of", deck[i][1])

Output

You got:

5 of Heart

1 of Heart

8 of Spade

12 of Spade

4 of Spade

Explanation:

5 0
3 years ago
3. Write a method squareOfAsterisks that displays a solid square (the same number of rows and columns) of asterisks whose side i
iren2701 [21]

Answer:

Following are the program to this question:

#include <iostream>//defining header file

using namespace std;

void squareOfAsterisks(int x) //defining method squareOfAsterisks

{

   int i,j; //defining integer variable

   for(i=1;i<=x;i++) //defining loop to print column value

   {

   for(j=1;j<=x;j++) //defining loop to print row value

   {

   cout<<"*"; //print value

   }

   cout<<endl; //for line break

   }

}

int main() //defining main method

{

int x; //defining integer variable

cout<<"Enter any number: "; //print message

cin>>x; //input value from user

squareOfAsterisks(x); //calling the method and pass the value

return 0;

}

Output:

Enter any number: 4

****

****

****

****

Explanation:

The description of the above program can be given as follows:

  • In the given program a method "squareOfAsterisks" is declared, that accepts an integer value "x" in its arguments, inside the method two integer variable I, j is used, that uses a to print the given pattern.
  • In the main method, an integer variable x is declared, which takes input from the user end, and then calls the method, that is "squareOfAsterisks" and passes its value.
8 0
3 years ago
To enable grammar correction in powerpoint, you must first enable office ____ services.
sesenic [268]

Answer:

Grammar

Explanation:

8 0
2 years ago
Read 2 more answers
Other questions:
  • Windows uses a graphical user interface (GUI), which means: a user can carry out commands by clicking, dragging, or otherwise ma
    6·1 answer
  • How does the browser display the same webpage whether you enter the URL or the IP address in the address bar? what system transl
    11·1 answer
  • How do you change between worksheets inside an excel workbook?
    13·2 answers
  • 5. RAM IS YOUR SYSTEM’S-
    14·2 answers
  • Design and implement an algorithm that gets a list of k integar values N1, N2,...Nk as well as a special value SUM. Your algorit
    10·1 answer
  • Which of the following statements is NOT true about url extension?
    10·2 answers
  • 10. List three adaptations of wind-pollinated plants to promote pollination.<br>​
    12·1 answer
  • Helppppppppppp please
    5·2 answers
  • Assignment 10 - 1/0 Streams and Files Create a C++ a program that will compute the average word length (average number of charac
    13·1 answer
  • 12. Why is it so important to pay attention to your digital reputation?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!