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
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);
}
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.