C
x
19
1
2
3
struct StructName
4
{
5
float struct_member;
6
};
7
8
void initfunction(struct StructName **object) {
9
scanf("%f", &((*object)->struct_member));
10
}
11
12
int main(void) {
13
struct StructName a, *pa;
14
pa = &a;
15
initfunction(&pa);
16
printf("%f\n", a.struct_member);
17
return 0;
18
}
19
$ gcc prog.c -Wall -Wextra -O2 -march=native -std=c99 -pedantic
Stdin
3.14
Start
3.140000
0
Finish