subject

You have been given 8 C files, each has the same logic, expressed in different ways. Each of the files is incomplete, marked by TBD. You must replace each TBD entry with appropriate C code. You must NOT alter any of the existing lines. You are only allowed to replace each TBD line with new lines. Each of the C programs do exactly the same task. Given a list of numbers on the command line, they find the sum, sum of squares and the sum of cubes. You do not have to add error checking. You can safely assume that all numbers are given nicely as integers on the command line and are in the range of -100 to 100.// gcc -Wall sum6.c -o sum6 // ./sum6 4 8 -5 0 20
// prints: Sum=27 Sum2=505 Sum3=8451
#include
#include
static void sum6(int argc, char *argv[], int *x, int *y, int *z) {
TBD
}
int main(int argc, char *argv[]) {
int x, y, z;
TBD
printf("Sum=%d Sum2=%d Sum3=%d\n", x, y, z);
return 0;
}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 12:30
What characteristic of long period comets suggest they come directly from the oort cloud?
Answers: 2
question
Computers and Technology, 23.06.2019 09:30
Why is an outfitting a workspace with video games in a technology development company considered a strategic use of money
Answers: 1
question
Computers and Technology, 23.06.2019 15:00
Barbara is interested in pursuing a career in the science and math pathway. which qualifications will her reach that goal? a.an advanced knowledge of physics and math b.an advanced knowledge of engineering and math c. an advanced knowledge of physics and robotics an d. advanced knowledge of machinery and math
Answers: 1
question
Computers and Technology, 24.06.2019 09:50
Suppose you are an ad-serving company and you maintain a log of cookie data for ads you serve to the web pages for a particular vendor (say amazon). a. how can you use this data to determine which are the best ads? b. how can you use this data to determine which are the best ad formats? c. how could you records of past ads and ad clicks to determine which ads to send to a given ip address? d. how could you use this data to determine how well the technique you used in your answer to part c was working? e. how could you use this data to determine that a given ip address is used by more than one person? f. how does having this data give you a competitive advantage vis-à-vis other ad-serving companies?
Answers: 2
You know the right answer?
You have been given 8 C files, each has the same logic, expressed in different ways. Each of the fil...
Questions
question
Mathematics, 13.01.2020 01:31
Questions on the website: 13722367