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
stiv31 [10]
3 years ago
13

The following code processes a file containing five positive numbers. What will the variable $result contain after the code is e

xecuted? Be careful! $result = 0; $someFile = fopen("some-file.txt", "r"); for ($count = 1; $count <= 5; $count = $count + 1) { $nextNum = fgets($someFile); } $result = $result + $nextNum; fclose ($someFile); print ("The result is $result ");
Computers and Technology
1 answer:
Tanzania [10]3 years ago
3 0

Answer:

highest of five numbers in the file

Explanation:

  • This code reads the file "some-file.txt" and saves the result in variable "somefile"
  • The runs a for loop for a count of 5.
  • In each loop it compares the current value of the file with the value of the variable result and if the result is true it updates the value of the variable result.
  • At the end of this code the variable result will contain the highest value in the file "some-file.txt" and print it.

You might be interested in
Who do you understand by term DATA give example? please give answer in own words​
xeze [42]

Answer:

The term data is simply defined as “facts and figures”. Each piece of data is a little fact that doesn't mean much on its own. The word data can be used for a singular fact or a collection of facts. It comes from the Latin word datum, meaning “something given”.Data is defined as facts or figures, or information that's stored in or used by a computer. An example of data is information collected for a research paper. An example of data is an email. ... Statistics or other information represented in a form suitable for processing by computer.

4 0
2 years ago
Read 2 more answers
From the computer desktop, clicking the Start button lets you _____.
stepan [7]
Locate and open Excel
8 0
3 years ago
Read 2 more answers
What term is used to describe an individual's money and personal property? budget income assets finances
Ilya [14]

Answer:

Pretty sure it's assests.

Explanation:

Income - Intake of money.

Budget - How much money you can spend.

Finances - Things you need to pay ort fund.

3 0
3 years ago
Read 2 more answers
please help me!!!!!! all of the following may be benefits of a technical or vocational college except
-BARSIC- [3]

Answer:

im not sure

Explanation: is their supposed to be a picture or something?

5 0
3 years ago
Read 2 more answers
"Write code that prints: Ready! countNum ... 2 1 Start! Your code should contain a for loop. Print a newline after each number a
BartSMP [9]

Explanation:

#include <iostream.h>

#inlcude<conion.h>

void main()

{

  int count, x;

  clrscr();

  cout<<"Enter the count:";

  cin>> count;

  cout<<"Ready!\n";

  for(x=count;x>0;x--)

  {

     cout<<x<<"\n";

  }

  cout<<"Start";

  getche();

}

This is a simple program where the output is expected to be in reverse order. So we run a for loop starting from the count and decrements the counter by 1 every time when the loop runs and print the value. So to print the output in "new line" we include "\n".

6 0
3 years ago
Other questions:
  • 2 negative impact of excessive use of computer even in solving mathematical problem.
    11·1 answer
  • People with healthy media diets:
    12·1 answer
  • ______ includes websites that encourage interaction and connection among people, businesses, and organizations.
    9·2 answers
  • Plzzz help! It’s due soon and I can’t figure it out
    13·1 answer
  • What are some ways to find out what skills you need to develop at work? Check all of the boxes that apply.
    15·2 answers
  • A physical host machine has four quad-core CPUs, 16GB of RAM, 1TB of hard drive space, and two 1Gbps NICs. If we need to create
    8·1 answer
  • Who is tim berners-lee
    14·2 answers
  • What is the outcome when a floating-point number is divided by zero?
    12·1 answer
  • Need help on this it’s the last one I need
    6·1 answer
  • How does abstraction make programming languages easier to use
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!