- ?
#include<stdio.h>
int main()
{
FILE *out = fopen("test.out","w");
int i = 6;
int *pi = &i;
fprintf(out, "%d", pi);
fclose(out);
printf("pi points to an int that has the value of %d\n", *pi);
FILE *in = fopen("test.out","r");
fscanf(in, "%d", &pi);
fclose(in);
printf("After reading the value of pi from the file, it points to an int that has the value of %d\n", *pi);
}
, , :
int *pi;
fscanf(in, "%d", &pi);
: "%x" .