blob: 0aefdc9d3679527d34f7184d0549a10811658212 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include <stdio.h>
#include <stdlib.h>
extern "C" {
int get_int() { return 5; }
float get_float() { return 3.14; }
char *get_string() { return "hello world"; }
void print_int(int x) { printf("%d\n", x); }
void print_float(float x) { printf("%.2f\n", x); }
void print_string(char *x) { printf("%s\n", x); }
int multi(int x, float y, int z, char *str) {
if (x) puts(str);
return (x + y) * z;
}
int *pointer(int *in) {
printf("%d\n", *in);
static int ret = 21;
return &ret;
}
}
int main(int argc, char **argv) { return 0; }
|