Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C arrays

Name: Anonymous 2008-11-15 10:18

is there a way to do this all in one function instead of splitting it into two?
#include <stdlib.h>

void stuff_with_a(char a[20000000][20]){
 for(int i = 0; i < 20000000; ++i){
  for(int j = 0; j < 20; ++j)
   a[i][j] = 0;
 }
}

int main(){
 char *a = malloc(20000000*20);
 stuff_with_a(a);
 sleep(60);
 return 0;
}

Name: Anonymous 2008-11-17 19:05

>>34,38
10/10

Name: Anonymous 2008-11-17 19:28

Too bad >>34 >>38 are not the same poster. I know, because I'm >>34 .

Name: Anonymous 2008-11-18 2:03

>>34,38,40
Hahaha, you think you can fool me? I, the expert programmer, laugh at you're insolence. You're all the same people, and we have been trolled constantly.

Name: Anonymous 2008-11-18 2:18

>>39-42
Same person.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List