Subset of C language with tree interpreter and bytecode compiler + VM.
25개 이상의 토픽을 선택하실 수 없습니다.
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
// pointer-compare
|
|
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
|
|
int main() {
|
|
int array[5] = {0, 1, 2, 3, 4};
|
|
int brray[5] = {0, 1, 2, 3, 4};
|
|
int *p = array + 2;
|
|
int *q = array + 4;
|
|
int *r = brray + 4;
|
|
if (p > q) abort(); printf("compare OK\n");
|
|
if (p < r) abort(); printf("compare OK\n"); // illegal comparison
|
|
return 0;
|
|
}
|