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
ASHA 777 [7]
4 years ago
12

When a file has been opened using the 'r' mode specifier, which method will return the file's contents as a string??

Computers and Technology
1 answer:
topjm [15]4 years ago
5 0
Assuming we're talking C here:

I would opt for fread() with the following notes:
- there are no guarantees that the whole file counts as one string.
- you need to know the length of the file to allocate enough memory.
- you need to append a trailing 0 in memory to terminate the string.

fgets() does return a 0-terminated string but is not exactly what is asked since it only reads until the next newline character which may be in the middle of the file.
You might be interested in
7. Write a Qbasic program to read the value
Shtirlitz [24]

Answer:

PRINT "Values for Principal (P), Rate (A) and Time (T)"

INPUT P, A, T

I = P * A * T/100

Amount = P + I

PRINT "Interest: ", I

PRINT "Amount: ", Amount

Explanation:

This prompts the user for values for Principal, Rate and Time

PRINT "Values for Principal (P), Rate (A) and Time (T)"

This gets values for Principal (P), Rate (R) and Time (T)

INPUT P, A, T

This calculates the interest (I)

I = P * A * T/100

This calculates the amount (A)

Amount = P + I

This prints the interest (I)

PRINT "Interest: ", I

This prints the amount (A)

PRINT "Amount: ", Amount

4 0
3 years ago
व्याख्या c) Differentiate between Raster Image and Vector Image.​
crimeas [40]

Vector images are described by lines, shapes, and other graphic image components stored in a format that incorporates geometric formulas for rendering the image elements

These are the types of images that are produced when scanning or photographing an object. Raster images are compiled using pixels, or tiny dots, containing unique color and tonal information that come together to create the image.

7 0
3 years ago
A virus has attacked your hard drive. Instead of seeing the Windows Start screen when you start up Windows, the system freezes a
Yanka [14]

Answer:

Boot to safe mode

Explanation:

When a virus attacks boot system, that is to say, Windows program won´t load. The following steps should be considered taking into account what Windows Version is being used, Windows 7, 8 or 10:

1. Press  F8 (Windows 7) F4 (Windows 8, 10)

2. Enable Safe Mode

3. Run Safe Mode

4. Once in safe mode the user will have access to Windows and eventually document files can be extracted via pendrive.

5 0
4 years ago
In comparing a computer to the human brain, the computer's hardware is like _____ and the computer's software is like _____.
Ne4ueva [31]
This includes application software<span> such </span>as<span> a word processor, which enables a user to perform a task, and system </span>software<span> such </span>as<span> an operating system, which enables other </span>software<span> to run properly, by interfacing with hardware and with other </span>software<span>.
</span>
Computer hardware<span> is the collection of physical parts of </span>a computer system<span>. This includes </span>the computer<span> case, monitor, keyboard, and mouse. It also includes all the parts inside </span>the computer<span> case, such </span>as<span> the hard disk drive, motherboard, video card, and many others. </span>Computer hardware<span> is what you can physically touch.


</span>
8 0
3 years ago
Why do we need the binary system?
nika2105 [10]

Answer:

We need to have binary numbers because that is how computers process data.

Explanation:

6 0
4 years ago
Other questions:
  • Processing is handled by the computer’s central processing unit (cpu).​ <br> a. True <br> b. False
    6·1 answer
  • The entirety of a packet at one layer becoming the payload section at another layer is known as
    8·2 answers
  • In 3-5 sentences, describe how you would insert a graph in your word-processing document.
    13·1 answer
  • With _______, applications are owned, delivered and managed remotely by one or more providers over the Internet or an intranet,
    15·1 answer
  • Hey mates.........needed asap 1.) Mention and explain four (4) ICT gadgets,
    9·2 answers
  • FOR DIGITAL DESIGN/ PHOTOGRAPHY
    5·2 answers
  • MORE FREEE POINTS AYEEE
    7·2 answers
  • You are planning to write a guessing game program where the user will guess an integer between one and 20. Put the commented ste
    12·1 answer
  • Which of the following are acceptable to share? Check all of the boxes that apply.
    13·1 answer
  • Example of Bandwidth Analogies: using Pipe
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!