ACtE03 · Chapter 3Programming & Applications🏛️ Past Licensure QuestionID: 20793dd9
What is the valid syntax for passing a structure as a formal argument to a function in C?
What is the valid syntax for passing a structure as a formal argument to a function in C?
Multiple Choice Options
- A✓ Correct Option
return_type function_name(struct StructureName parameter_name)
- B
return structure type, function name()
- C
Both a and b
- D
None of the above
Detailed Technical Solution & Explanation
In C, a structure can be passed by value as a formal parameter to a function by specifying the struct keyword, structure tag name, and formal parameter identifier in the function signature: void display(struct Student s);.
Option Analysis:
•
Option A (return_type function_name(struct Stru...): Correct. Standard formal argument syntax for passing a structure in C.
•
Option B (return structure type, function name()): Incomplete; does not include parameters.
•
Option C (Both a and b): Incorrect.
•
Option D (None of the above): Incorrect.
Reference: Demo · Set 4NEC Licensure Syllabus