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
Design a program that asks the user to enter a series of 20 numbers. The program should store the numbers in a list and then dis
Aleksandr-060686 [28]

Answer:

The following are the program in the Python Programming Language.

#declare the list  

lst=[]

#set the for loop  

for num in range(1,21):

 #get the element of the list from the user

 n=int(input('Enter the {} element :' .format(num)))

 #add elements in the list

 lst.append(n)

print()

#print the minimum number in list

print('The lowest number in the list: ',min(lst))

#print the maximum number in list

print('The highest number in the list: ',max(lst))

#print the total of the list

print('The total of the numbers in the list: ',sum(lst))

#print the average of the list

print('The average of the numbers in the list: ',sum(lst)/len(lst))

<u>Output</u>:

Enter the 1 element :53

Enter the 2 element :65

Enter the 3 element :41

Enter the 4 element :23

Enter the 5 element :21

Enter the 6 element :12

Enter the 7 element :96

Enter the 8 element :85

Enter the 9 element :74

Enter the 10 element :98

Enter the 11 element :75

Enter the 12 element :41

Enter the 13 element :54

Enter the 14 element :56

Enter the 15 element :36

Enter the 16 element :25

Enter the 17 element :14

Enter the 18 element :12

Enter the 19 element :45

Enter the 20 element :65

The lowest number in the list:  12

The highest number in the list:  98

The total of the numbers in the list:  991

The average of the numbers in the list:  49.55

Explanation:

<u>The following are the description of the program</u>.

  • Firstly, we declare the empty list type variable 'lst' to store elements.
  • Then, set the for loop statement that iterates from 1 and end at 20.
  • Then, set a variable that get elements of the list from the user and appends those user defined inputs in the list type variable 'lst'.
  • Finally, print the lowest and the largest elements in the list as well as print the total and average of the elements in the list.
6 0
3 years ago
A(n) systems analyst codes system software, fine-tunes operating system performance, and performs other system software-related
NikAS [45]
In general, a systems analyst is a person who uses analysis and design strategies to solve business problems.
They also analyze an organization’s current computer systems and develop information systems solutions to help the organization run more smoothly.

Now knowing a systems analyst job, therefore the answer to this is “FALSE”.

<span> </span>

6 0
3 years ago
How do you change a automatic transmission
irinina [24]

Answer:

ohhh ok to all transactions.

6 0
2 years ago
Which of the following is true about speculative risks? a. The risk/return tradeoff is applicable to speculative risks. b. Specu
My name is Ann [436]

Answer:

A) The risk/return Tradeoff is applicable to speculative risks.

Explanation:

Speculative risk always has a positive payoff and also a negative payoff , so option (b) is incorrect.

Speculative risk is a source of great concern for risk managers, so option (c)is incorrect.

Speculative risk is a category of risk that can be taken on voluntarily and will either result in a profit or loss , so option d is wrong

Pure risk, also called absolute risk, is a category of threat that is beyond human control and has only one possible outcome if it occurs: loss. Pure risk includes such incidents as natural disasters, fire or untimely death. so option (e) also incorrect

7 0
3 years ago
Pasar el número 12875 del sistema decimal al sistema octal.
PolarNik [594]

Answer:

Va Bene

Explanation:

Insiama ma parla da auditore

4 0
3 years ago
Other questions:
  • Which does a traditional camera need in order to capture images?
    13·1 answer
  • What is Least effective at preventing a computer virus
    10·1 answer
  • Cloud computing will offer applications that are _______.
    14·2 answers
  • Hello everyone. I need help. C programming. Create at least two more functions except the main () function to collect them.
    5·1 answer
  • What is the purpose of the Occupational Safety and Health Act?
    7·2 answers
  • I'm confused. Are , , and elements or nodes? What exactly defines nodes? What defines elements?
    13·1 answer
  • What was the first portable computer called and who made it?
    9·1 answer
  • I need the answer ASAP!!!! I’ll mark brainliest if correct
    13·1 answer
  • Choose the true statement below. (html)
    5·1 answer
  • You need to pay an Internet Service Provider (ISP) for services rendered. Which payment technology would you use?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!