Question: Using C programming, please answer all questions explicitly. Please do not answer if you are unwilling to reply to comments. 1. Swap a) Write a
Using C programming, please answer all questions explicitly. Please do not answer if you are unwilling to reply to comments.
1. Swap a) Write a function to swap two integers, and answer the following questions (you can have them answered in your comments, or in your report preferably): What's the return type of your swap function? Why? What's the type of the arguments of your swap function? Why? What's the meaning of * in your argument list? For each line in your swap function code block: 1) 2) 3) 4) i. If there is a operator involved, explain what the right value and what the left variable are. ii. If there is any *involved, explain what it is for. (Ifappears twice in a line, you need to have explanations for both) 5) How do you call the swap function (i.e. What do you pass as arguments for the function call)? Why? b) Write a function to swap two integer pointers, and answer the same questions in a)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
