include stdio struct foobar int INT float FLOAT char STRING struct foo

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <stdio.h>
struct foobar
{
int INT;
float FLOAT;
char * STRING;
};
struct foobar
foobarbar (int i, float f, char *s)
{
struct foobar fb = { INT: i, FLOAT: f, STRING: s };
return fb;
}
int main (int argc, char **argv)
{
struct foobar s = { INT: 1,
FLOAT: 1.f,
STRING: "one" };
printf ("%s\n", foobarbar (1, 1.0, "2").STRING);
return 0;
}