Hello I wrote this code but it's not working. I would be very greatful if anyone could help me out. It passes the structure as a function parameter into another function and returens it's values for the desired variable. I will be very graet full if anyone could help me and point out the mistakes.
Code:
#include <stdio.h>
float test(information_t in);
typedef struct{
int number;
int place;
int postcode;
} information_t;
int main()
{
information_t information;
information *in;
printf(" Please enter the number: ");
scanf(" %d",&information.number);
printf(" Please enter the place: ");
scanf(" %d",&information.place);
printf(" please enter the postcode: ");
scanf(" %d",&information.postcode);
test(information_t in);
return 0;
}
float (information_t in)
{
char position;
position= scanf(" %d%d%d", in->number, in->place, in->postcode);
return(position);
}