Subset of C language with tree interpreter and bytecode compiler + VM.
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 

45 wiersze
927 B

#!./main
#include <stdio.h>
#include <stdint.h>
int x = 21;
int baz(int xx, ...) { return 42; }
int foo(void) { return x + x; }
char *bar(void) { return "bye bye"; }
int main(int argc, char **argv)
{
printf("hello, world %d %s\n", foo(), bar());
printf("baz is %d %d %d\n", baz(1), baz(1, 2), baz(1, "two", 3));
int x = 42;
int *p = &x;
printf("x is %d p is %p\n", *p, p);
*p = 666;
printf("x is %d %d\n", x, *p);
x = 123;
printf("x is %d %d\n", x, *p);
for (x = 0; x < 10; ++x) {
if (x == 5) printf("%%");
printf("%d ", x);
}
printf("\n");
while (x > 0) printf("%d ", --x);
printf("\n");
printf("%d\n", sizeof(char *));
int array[5];
printf("array size %d\n", sizeof(array));
int i;
for (i = 0; i < 5; ++i) array[i] = i*i;
for (i = 0; i < 5; ++i) printf("%d\n", array[i]);
return 0;
}
// Local Variables:
// mode: c
// End: