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-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.

Name: Anonymous 2008-11-18 3:02

>>42
>>41 here. You are wrong, since this is my second post in this thread. I would know, you know how? I am >>41.

Name: Anonymous 2008-11-18 14:31

>>35

#include <stdio.h>

int main(void) {
    printf("%d\n", (int)sizeof(42)["where is your god now?"]);
    return 0;
}

Name: Anonymous 2008-11-18 20:11

>>44
Oldest trick in the world.

Name: Anonymous 2008-11-18 20:34

>>44
error 4:35 - Syntax error at '[', expected ');'

Name: Anonymous 2008-11-19 2:02

>>46
Use a C compiler.

Name: Anonymous 2008-11-20 2:56

sizeof 42["where is your god now?"]
1

Holy fucking shit sizeof really does work without parenthesis

Name: Anonymous 2008-11-20 6:55

>>48
because it's an operator

Name: Anonymous 2008-11-20 10:34

>>49
(sizeof (sizeof))

Name: Anonymous 2008-11-20 17:20

>>50
6

Name: Anonymous 2008-11-20 22:34

Name: Anonymous 2010-11-15 16:13

Name: Anonymous 2013-06-18 19:47

I ARE ANDRU

Name: Anonymous 2013-06-18 19:54

I ARE ANDRU

Name: Anonymous 2013-06-18 20:01

I ARE ANDRU

Name: Anonymous 2013-06-18 20:08

I ARE ANDRU

Name: Anonymous 2013-06-18 20:15

I ARE ANDRU

Name: Anonymous 2013-06-18 20:23

I ARE ANDRU

Name: Anonymous 2013-06-18 20:30

I ARE ANDRU

Name: Anonymous 2013-06-18 20:37

I ARE ANDRU

Name: Anonymous 2013-06-18 20:44

I ARE ANDRU

Name: Anonymous 2013-06-18 20:51

I ARE ANDRU

Name: Anonymous 2013-06-18 20:58

I ARE ANDRU

Name: Anonymous 2013-06-18 21:05

I ARE ANDRU

Name: Anonymous 2013-06-18 21:12

I ARE ANDRU

Name: Anonymous 2013-06-18 21:19

I ARE ANDRU

Name: Anonymous 2013-06-18 21:26

I ARE ANDRU

Name: Anonymous 2013-06-18 21:34

I ARE ANDRU

Name: Anonymous 2013-06-18 21:41

I ARE ANDRU

Name: Anonymous 2013-06-18 21:48

I ARE ANDRU

Name: Anonymous 2013-06-18 21:55

I ARE ANDRU

Name: Anonymous 2013-06-18 22:02

I ARE ANDRU

Name: Anonymous 2013-06-18 22:09

I ARE ANDRU

Name: Anonymous 2013-06-18 22:17

I ARE ANDRU

Name: Anonymous 2013-06-18 22:24

I ARE ANDRU

Name: Anonymous 2013-06-18 22:31

I ARE ANDRU

Name: Anonymous 2013-06-18 22:38

I ARE ANDRU

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