|
|
1.1 root 1: void demo_r(string)
2: char *string;
3: {
4: printf("%r\n", (char **)&string);
5: }
6:
7: main()
8: {
9: extern void demo_r();
10: int precision = 1;
11: int integer = 10;
12: float decimal = 2.75;
13: double bigdec = 27590.21;
14: char letter = 'K';
15: char buffer[20];
16:
17: strcpy (buffer, "This is a string.\n");
18:
19: printf("This is an int: %d\n", integer);
20: printf("This is a float: %f\n", decimal);
21: printf("Another float: %3.*f\n", precision, decimal);
22: printf("This is a double: %lf\n", bigdec);
23: printf("This is a char: %c\n", letter);
24: printf("%s", buffer);
25: printf("%s\n", "This is also a string.");
26:
27: demo_r("Print everything: %d %f %lf %c",
28: integer, decimal, bigdec, letter);
29: }
30:
31:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.