new tasks

This commit is contained in:
Ingy döt Net 2013-04-09 00:46:50 -07:00
parent 2a4d27cea0
commit 80737d5a6a
1194 changed files with 15353 additions and 1 deletions

View file

@ -0,0 +1,12 @@
int* ar; /* Collection<Integer> ar; */
int arSize;
arSize = (rand() % 6) + 1;
ar = calloc(arSize, sizeof(int) ); /* ar = new ArrayList<Integer>(arSize); */
ar[0] = 1; /* ar.set(0, 1); */
int* p; /* Iterator<Integer> p; Integer pValue; */
for (p=ar; /* p=ar.itereator(); for( pValue=p.next(); */
p<(ar+arSize); /* p.hasNext(); */
p++) { /* pValue=p.next() ) { */
printf("%d\n",*p); /* System.out.println(pValue); */
} /* } */

View file

@ -0,0 +1,11 @@
#define cSize( a ) ( sizeof(a)/sizeof(a[0]) ) /* a.size() */
int ar[10]; /* Collection<Integer> ar = new ArrayList<Integer>(10); */
ar[0] = 1; /* ar.set(0, 1); */
ar[1] = 2;
int* p; /* Iterator<Integer> p; Integer pValue; */
for (p=ar; /* for( p = ar.itereator(), pValue=p.next(); */
p<(ar+cSize(ar)); /* p.hasNext(); */
p++) { /* pValue=p.next() ) { */
printf("%d\n",*p); /* System.out.println(pValue); */
} /* } */