I have a code with two functions outside of main. I need to pass multiple values from one function to the next. I've tried using pointers and there's no errors when compiling but the programme just ends prematurely. I think this is call by reference but I don't really understand it.

```
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int GetRValues (char prompt[70]);

//start main
int main()
{
    char prompt[70]="Please enter a value in the range 1000 to 1000000\0";
    float R_a,R_b,R_c;
    GetRValues(prompt[70]);
    printf("%f, %f, %f", &R_a, &R_b, &R_c);
}
//function for receiving inputs
int GetRValues(char prompt[70])
{
    //declare input variables
    float *R_a;

    //display prompt
    printf("%s\n", prompt);

    //force user to input values for R_a
    printf("R_a = ");
    scanf("%f",&*R_a);

    return 0;
}

```

Here is full programme using pointers:

```
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int GetRValues (char prompt[70], float Rmin, float Rmax);      //declare input function
void ConvertValues(char input,float Ptr_a, float Ptr_b, float Ptr_c);    //declare conversion function
char input;
float Ptr_a, Ptr_b, Ptr_c;

int main()
{
    float Rmin = 1000;
    float Rmax = 1000000;
    char prompt[70]="Please enter a value in the range 1000 to 1000000\0";

    do
    {
        printf("Select operation:\n");
        printf("__________________________\n");
        printf("s: Star to Delta Transformation\n");
        printf("d: Delta to Star Transformation\n");
        printf("q: Exit\n");
        printf("__________________________\n");
        printf("Select: ");
        scanf("%c",&input);

        if (input == 's' || input == 'd')
        {
            GetRValues(prompt,Rmin,Rmax) ==0;
            do
            {
                ConvertValues(input, Ptr_a, Ptr_b, Ptr_c);
                break;
            }

            while (GetRValues(prompt,Rmin,Rmax) ==1);

        }

    }
    while(input != 'q');

    return 0;
}

int GetRValues(char prompt[70], float Rmin, float Rmax)
{
    //declare input variables
    float R_a,R_b,R_c,*Ptr_a,*Ptr_b,*Ptr_c;
    void ConvertValues(char input,float Ptr_a, float Ptr_b, float Ptr_c);
    //display prompt
    printf("%s\n", prompt);

    //force user to input valid values for R_a, R_b and R_c
    printf("R_a = ");
    scanf("%f",&R_a);
    while(R_a>Rmax)
    {
        printf("Please enter a value below %f\n",&Rmax);
        scanf("%f",&R_a);
    }
    while(R_a<Rmin)
    {
        printf("Please enter a value above %f\n",&Rmin);
        scanf("%f",&R_a);
    }

    printf("R_b = ");
    scanf("%f",&R_b);
    while(R_b>Rmax)
    {
        printf("Please enter a value below %f\n",&Rmax);
        scanf("%f",&R_b);
    }
    while(R_b<Rmin)
    {
        printf("Please enter a value above %f\n",&Rmin);
        scanf("%f",&R_b);
    }

    printf("R_c = ");
    scanf("%f",&R_c);
    while(R_c>Rmax)
    {
        printf("Please enter a value below %f\n",&Rmax);
        scanf("%f",&R_c);
    }
    while(R_c<Rmin)
    {
        printf("Please enter a value above %f\n",&Rmin);
        scanf("%f",&R_c);
    }
    //transferring values to pointers
    *Ptr_a = R_a;
    *Ptr_b = R_b;
    *Ptr_c = R_c;
    printf("%f",&Ptr_a);
    return 1;
}
void ConvertValues(char input, float Ptr_a, float Ptr_b, float Ptr_c)
{
 float R_a,R_b,R_c,R_1,R_2,R_3;
    if (input ==  's')
    {
        R_1=(Ptr_a*Ptr_b)+(Ptr_b*Ptr_c)+(Ptr_a*Ptr_c)/Ptr_c;
        R_2=(Ptr_a*Ptr_b)+(Ptr_b*Ptr_c)+(Ptr_a*Ptr_c)/Ptr_b;
        R_3=(Ptr_a*Ptr_b)+(Ptr_b*Ptr_c)+(Ptr_a*Ptr_c)/Ptr_a;

        printf("The resistance values in Delta: \n");
        printf("Ptr_a = %.2f Ohms\n",R_1);
        printf("Ptr_b = %.2f Ohms\n",R_2);
        printf("Ptr_c = %.2f Ohms\n",R_3);
    }
 else
    {
        R_1=(Ptr_a*Ptr_b)/Ptr_a+Ptr_b+Ptr_c;
        R_2=(Ptr_a*Ptr_c)/Ptr_a+Ptr_b+Ptr_c;
        R_3=(Ptr_b*Ptr_c)/Ptr_a+Ptr_b+Ptr_c;

        printf("The resistance values in Star: \n");
        printf("Ptr_a = %.2f Ohms\n",R_1);
        printf("Ptr_b = %.2f Ohms\n",R_2);
        printf("Ptr_c = %.2f Ohms\n",R_3);

    }
    }

```