Useless Scripts/Programs

hehe

crazy how this was supposed to be a thread for sharing useless programs, then it turned into one that discussed UPFs and the spike in autism diagnoses and now it turned into a programming support one
 
A test about pointers in C. You can try to guess what it does.

C:
#include <stdio.h>

int main(void)
{
	#define A_SIZE 25
	int i, a[A_SIZE]={-1}, *ip;
	for (i=0;i<A_SIZE;a[i]=i,i++);
	for (i=0,ip=(int*)a;i<A_SIZE;ip++,i++) printf("a[%d]=%d\n",i,*ip+4);
}
 
Back
Top