Question: C PROGRAM ONLY: Suppose that you are using getchar() and putchar() to write a C program that copies from an input file to an output

C PROGRAM ONLY:

Suppose that you are using getchar() and putchar() to write a C program that copies from an input file to an output file, one character at a time. Should you copy the EOF character to the output file? Why or why not?

Write a function declaration (prototype) for a function magnitude() that takes a single argument of data type "integer" and returns an int. The function definition is NOT required, only the prototype.

Write a function declaration (prototype) for a function smallest() that takes two arguments of data type "double" and returns a double.

Write a function declaration (prototype) for the function prtbox() takes no arguments and returns nothing.

Why can an actual argument be any expression with an appropriate type of value, but a formal argument can only be a variable?

In your own words, describe what a pointer variable is and identify at least one way they are used in the C language.

Declare a pointer variable called "size" that is a pointer to an integer variable.

Declare a pointer variable called "water_termperature" that is a pointer to a float variable.

Explain in your own words what global variables are (provide example code) and explain how and why they might be used.

Why are global variables dangerous, and why should they be not be used whenever possible?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!