Computers and Technology, 28.06.2019 18:30 saharB
Convert activity3.c below to a multi-file c program with 3 files: activity3.c, mymath. h, and mymath. c. give the gcc command to build the new program. don’t forget the include guards! when you are done, copy each file to this document in the appropriate place.
/* activity 3 - create a header file */
#include
#define pi 3.14159
int square(int x) {
return x * x;
}int main() {
int radius;
double area;
printf("enter the radius: ");
scanf("%d", & radius);
area = pi * square(radius);
printf ("the area of a circle with radius %d is %.2f\n", radius, area);
return 0;
}
Answers: 1
Computers and Technology, 22.06.2019 15:00
Which of the following has not been attributed at least in part to social media a. drug addiction b. depression c. kidnapping d. murder
Answers: 2
Computers and Technology, 23.06.2019 17:30
When making changes to optimize part of a processor, it is often the case that speeding up one type of instruction comes at the cost of slowing down something else. for example, if we put in a complicated fast floating-point unit, that takes space, and something might have to be moved farther away from the middle to accommodate it, adding an extra cycle in delay to reach that unit. the basic amdahl's law equation does not take into account this trade-off. a. if the new fast floating-point unit speeds up floating-point operations by, on average, 2ă—, and floating-point operations take 20% of the original program's execution time, what is the overall speedup (ignoring the penalty to any other instructions)? b. now assume that speeding up the floating-point unit slowed down data cache accesses, resulting in a 1.5ă— slowdown (or 2/3 speedup). data cache accesses consume 10% of the execution time. what is the overall speedup now? c. after implementing the new floating-point operations, what percentage of execution time is spent on floating-point operations? what percentage is spent on data cache accesses?
Answers: 2
Computers and Technology, 24.06.2019 03:30
Auniform resource locator (url) is a formatted string of text that web browsers, email applications, and other software programs use to identify a particular resource on the internet. true false
Answers: 2
Computers and Technology, 24.06.2019 05:00
Who is most likely be your target audience if you create a slide presentation that had yellow background and purple text
Answers: 2
Convert activity3.c below to a multi-file c program with 3 files: activity3.c, mymath. h, and mymat...
Mathematics, 02.01.2022 16:40
English, 02.01.2022 16:40
History, 02.01.2022 16:40
Mathematics, 02.01.2022 16:40
Chemistry, 02.01.2022 16:40
Physics, 02.01.2022 16:40
Physics, 02.01.2022 16:40
Social Studies, 02.01.2022 16:40
Physics, 02.01.2022 16:40
Chemistry, 02.01.2022 16:40
English, 02.01.2022 16:40