Assume the following structure definition and associated typ
Assume the following structure definition and associated typedef statement:
struct test
{
int num1;
float value1;
};
typedef struct test Test;
Which of the following function prototypes are valid. Assume each of the functions listed take a single argument, and return nothing. (Select all that apply.)
void test_function4 (struct Test);
void test_function3 (struct test);
void test_function1 (Test);
void test_function2 (test);
| a. | void test_function4 (struct Test); | |
| b. | void test_function3 (struct test); | |
| c. | void test_function1 (Test); | |
| d. | void test_function2 (test); |
Solution
Only b and c are correct.
struct test defines structure and same assignes to Test.
Test hold struct test.
b. void test_function3 (struct test);
c. void test_function1 (Test);
