All pastes #1816372 Raw Edit

C

public c v1 · immutable
#1816372 ·published 2010-03-01 02:02 UTC
rendered paste body
#include <stdio.h>#include <stdlib.h>typedef struct {	int a;	int b;	char buffer[10];	char *something;} com;#define SIZE 213int main(){	com **array;	int i;	array = malloc(sizeof(com*) *SIZE);	array[0] = malloc(sizeof(com) * SIZE);	for(i=0;i<SIZE;i++){		array[i]=array[0]+(i*sizeof(com));		printf("i=%i, a=%i,b=%i,c=%p\n",			i,array[i]->a,array[i]->b,array[i]->buffer);	} 	return 0;}