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
Provide one example of how information technology has created an ethical dilemma that would not have existed before the advent o
Vitek1552 [10]

Answer:

grip

Explanation:

aaaaaaaaaaaaaaaaaaa

8 0
3 years ago
You have been tasked with finding the routers that have been installed between two networks. what utility would you use to provi
Kazeer [188]
Netstat -r

Should take care of it.
4 0
3 years ago
The Pentium 4 Prescott processor, released in 2004, has a clock rate of 3.6 GHz and voltage of 1.25 V. Assume that, on average,
Zarrin [17]

Answer:

a) C = 3.2 x 10^-8 F, C = 2.9 x 10^-8 F

b) 10%, 42.86%, 0.11, 0.75

c) 0.849 volts to maintain the same leakage current in the Pentium 4 Prescott Processor. 0.783 Volts to maintain the same leakage current in the Core i5 Ivy Bridge Processor.

Explanation:

<u>For the Pentium 4 Prescott processor:</u>

Clock rate (f) = 3.6 GHz

Voltage (V) = 1.25 V

Static Power Consumption = 10 W

Dynamic Power Consumption = 90 W

<u>For the Core i5 Ivy Bridge processor:</u>

Clock rate (f) = 3.4 GHz

Voltage (V) = 0.9 V

Static Power Consumption (SP) = 30 W

Dynamic Power Consumption (DP) = 40 W

(a) To find the average capacitive loads, use the formula:

DP = (1/2) x C x V² x f

Rearranging:

C = (2 x DP)/(V² x f)

For the Pentium 4 Prescott processor:

C = (2 x 90) / [(1.25)² x 3.6 x 10^9]

C = 3.2 x 10^-8 F

For the Core i5 Ivy Bridge processor:

C = (2 x 40) / [(0.9)² x 3.4 x 10^9]

C = 2.9 x 10^-8 F

(b) Percentage of the total dissipated power comprised by the static power can  be found by the formula:

<u>[Static Power/(Static Power + Dynamic Power)] x 100</u>

For the Pentium 4 Prescott Processor:

[10/(90+10)] x 100  = 10%

For the Core i5 Ivy Bridge Processor:

[30/30+40] x 100 = 42.86 %

Ratio of static power to dynamic power for each technology can be computed as:

Pentium 4 Prescott: 10/90 = 0.11

Core i5 Ivy Bridge: 30/40 = 0.75

(c) The total dissipated power can be calculated by:

P = DP + SP

For Static Power we have the formula:

SP = VI where I is the leakage current.

I = SP/V

For Pentium 4 Prescott: I = 10/1.25 = 8A

For Core i5 Ivy Bridge: I = 30/0.9 = 3.33 A

The total disspited power is reduced by 10%, meaning the ratio of new power to old power must be 90% = 0.9. So,

New Power/Old Power = 0.9

For Pentium 4 Prescott:

DP + SP / 100 = 0.9

VI + CV²F = 0.9 x 100

V(8) + (3.2 x 10^-8)V²(3.6 x 10^9) = 90

8V + 115.2V² - 90 = 0

By solving the quadratic equation, we get the positive answer as 0.849. This means that the voltage should be reduced to 0.849 volts to maintain the same leakage current in the Pentium 4 Prescott Processor.

For Core i5 Ivy Bridge:

DP + SP / 70 = 0.9

V(3.33) + (2.9 x 10^-8)V²(3.4 x 10^9) = 70 x 0.9

3.33V +98.6V² -63 = 0

By solving the quadratic equation we get the positive answer as 0.783. This means that the voltage should be reduced to 0.783 Volts to maintain the same leakage current in the Core i5 Ivy Bridge Processor.

6 0
3 years ago
What computer did d takahashi and y kanada use to calculate pi?
Brut [27]
<span>It depends on how much places they calculated to. As far as I remember D</span> Takahashi and Y<span> Kanada</span><span> used HITACHI SR2201 </span>to calculate pi to 5153960000 places and later they used<span> HITACHI SR8000 to calculate pi to</span> 206,158,430,000 places.
8 0
2 years ago
When Dale made the decision to sell his stock in copper, he was using a
frosja888 [35]

Answer: A. Dale needs to configure the information system to produce specific types of data that are relevant to his business

6 0
3 years ago
Other questions:
  • ____ is the use of networking technology to provide medical information and services.
    14·1 answer
  • Develop a Matlab program that allows you to plot the entropy of a source with variable output probabilities. We wish to observe
    8·1 answer
  • This is a legitimate question if you have a problem then just ignore it. What is the difference between CRVM and SAPX in a progr
    9·2 answers
  • In this lab, you will create a programmer-defined class and then use it in a Java program. The program should create two Rectang
    14·1 answer
  • Mention any four features which a standard computer laboratory should have​
    8·2 answers
  • Please explain what steps you will take to prevent hackers from getting access to your personal information.
    7·1 answer
  • 3. Which part of the computer is used<br> for typing?<br> a. Mouse<br> b. Keyboard
    7·2 answers
  • What is the greatest number of bits you could borrow from the host portion of a class B subnet mask and still have at least 130
    14·1 answer
  • With _____ technology, a web server delivers information to users, who have signed up for the service, instead of waiting for th
    5·1 answer
  • An Inspect and Adapt (I&amp;A) event is occurring and a program is trying to address a long-existing problem (WIP)?"unreliable P
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!