please answer within 30 minutes.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
please answer within 30 minutes.
C ++:
We wrote the following function that was supposed
to count the number of times a particular number
appeared in an array and return the count to the
calling function. There are many errors in the
function, some of them are style errors, and some of
them are programming errors (syntax, logic,
runtime). Your job is to identify every error, the type
of error, then fix the error so that the function would
work correctly.
1. double COUNTVALUES(integer array, value) {
2.
int Howmany;
3.
for (i = 1; i <= array[0] / sizeof(array); i++) {
%3|
4.
if (array[i] = value) howmany++;
5.}
outlines each error and identifies the line number,
the error, the type of error (style, syntax, logic,
runtime), and why it is an error and write the
function
Transcribed Image Text:C ++: We wrote the following function that was supposed to count the number of times a particular number appeared in an array and return the count to the calling function. There are many errors in the function, some of them are style errors, and some of them are programming errors (syntax, logic, runtime). Your job is to identify every error, the type of error, then fix the error so that the function would work correctly. 1. double COUNTVALUES(integer array, value) { 2. int Howmany; 3. for (i = 1; i <= array[0] / sizeof(array); i++) { %3| 4. if (array[i] = value) howmany++; 5.} outlines each error and identifies the line number, the error, the type of error (style, syntax, logic, runtime), and why it is an error and write the function
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY