Question: 3. Write a function in C and C++ that takes a 4 digit integer (not four separate integers) and returns a 4 digit number that
3. Write a function in C and C++ that takes a 4 digit integer (not four separate integers) and returns a 4 digit number that is reverse of the entered number. Use that function in a program. Function signature is as follows and it will be same for both C and C++. int reverse(int num) An output Please enter a 4-digit nunber : :8976 from the Reverse of 8976 is 6798 program is as follows
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
