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
What is the purpose of a mail merge field.
coldgirl [10]

adding merge fields is a way to personalize a document with information from the data source. The merge fields come from the column headings in the data source.

:)

3 0
3 years ago
You enter information by keying it into the??​
Greeley [361]

Answer:

password and username

Explanation:

3 0
3 years ago
Read 2 more answers
____________________ are compromised systems that are directed remotely (usually by a transmitted command) by the attacker to pa
Talja [164]

Answer: Zombies

Explanation: Zombie is a computer device that is responsible for the compromising the system and making it prone to several destruction such as the Trojan horse virus,hackers and other viruses as well. Zombie makes the computer system to get malfunctioned easily ,that is without much security and various malicious functions can be performed.They basically act as the infected computer .

6 0
3 years ago
Read 2 more answers
Why will my note 5 not download videos from the web?
meriva
Try downloading an app if the phone is not doing it.
7 0
3 years ago
What type of virus was the "lloveyou" virus?<br> 1.Trojan<br> 2.Worm
Paul [167]

Answer:

2. Worm

Explanation:

8 0
3 years ago
Read 2 more answers
Other questions:
  • There is no way to track your smartphone once you lost it, true or false?
    15·2 answers
  • Write algorithm to find (a+b)^2=(a+b)*(a+b)​
    9·1 answer
  • List and describe four communication tools that are currently popular.
    9·1 answer
  • Self contained sequences of actions to be performed are?
    6·1 answer
  • The concept of "space" on a computer usually refers to the___.​
    7·1 answer
  • How could you insert a new row between rows 20 and 21?
    7·2 answers
  • What can provides access to the only menu in office 2007​
    13·1 answer
  • Guess The Song: <br> What Popping Brand New Whip Just Hopped In, I Got options
    15·1 answer
  • SOMEONE PLEASE HELP ME OUT WITH THIS!!!!!!
    12·2 answers
  • Hi am feeling really happy just passed a test after a lot of tries :-)
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!