The following program is one good example that illustrates how we can return more than one value in a function. The answer is certainly using Pointers. The following program demonstrates the method.
Write a function that calculates both Area and Perimeter/ Circumference of the Circle, whose Radius is
entered through the keyboard.
float area, perimeter;
printf("\nEnter radius of a circle:");
scanf ("%d", &radius);
areaperi (radius, &area, &perimeter);
areaperi(int r, float *a, float *p)
//This Program exhibits the use of Call By Reference.
The program can be found at: