programming

profileBaller4mom

 

1. Pick any sample program in your book (IT MUST BE FROM 

YOUR BOOK) in the previous chapters and modify it so that it 

uses pointers.   (15 points)

2. Then do one of the three assignments below.  (25 points) 

1.

Write a small program that accepts two numbers from the user. Write a 

function that compares the two numbers and if the first number is greater than the 

second number they swap the numbers. 

But you will be using pointer notation in your function. You will be passing the 

address of each variable from the main function to pointer arguments in the 

function. Then you will order the values that those pointers point to using pointer 

notation. 

You will display the proper order of the two numbers in your main function after 

executing the function that swamps the two numbers.  

    • 9 years ago
    • 1
    Answer(0)