Question: Create a main function in which an integer n is initialized to 0. Create a pointer to it, and name it ptrN. Write a
Create a main function in which an integer "n" is initialized to 0. Create a pointer to it, and name it "ptrN". Write a loop to increment the value in n to 100 by using ptrN (you cannot directly increment n). Print the value of n in each iteration. (30pts) Implement the function named "swap" to swap the values of two integer variables. Call that function from a main function, to swap two integer variables (a=10, b=20). Provide a screenshot for your code and results. (30pts)
Step by Step Solution
3.34 Rating (154 Votes )
There are 3 Steps involved in it
Answer code is as follow public c... View full answer
Get step-by-step solutions from verified subject matter experts
