#include<stdlib.h>
#include<assert.h>

int n = 5;
int m = 2;

void main() {
	double *p;
	char *q;
	double *r;
	double result;
	int i;
	
	
	p = (double*)malloc(n*sizeof(double));
	for (i=0; i<n; i++) p[i] = i;
	q = (char*)p;
	q += m*sizeof(double);
	r = (double*)q;
	result = *r;
	assert result == m;
	free(p);
}
