Question: Write a program three.c which contains a function (named three) that takes two arguments: a pointer to an int and a pointer to a

Write a program

Write a program "three.c" which contains a function (named "three") that takes two arguments: a pointer to an int and a pointer to a char. The function should return a float. This function should examine the value pointed at in the first argument. If the value is even, set the value pointed at by the second argument to be an 'E', if it is odd, set the second value to 'O'. Then return the integer pointed at by the first argument reduced by 1 as a float (you will need to cast the result). Finally, increment the first integer. Example Input: 7 Output: 806.0 Here's a copy of the starter code: #include // Define three here. int main(void) { int a; scanf("%d", &a); char b; float c = three(&a, &b); printf("%d %c %.lf", a, b, c); return 0; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Below is the modified code for threee based on your r... View full answer

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 Programming Questions!