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

Pages: 1-

Useful functions

Name: Anonymous 2010-02-02 16:27

/\
* Returns 1 if the computer is on. If the computer isn't on, the value returned
  by this function is undefined. *\
/

int is_computer_on(void) {
   int ret;
   return 1?1:ret;
}

/\
* Returns the temperature of the motherboard if the computer is currently
  on fire. If the computer isn't on fire, the function returns some other
  value. *\
/

double is_computer_on_fire(void) {
   double ret;
   return 1?ret:1;
}

Name: CODE TAGS 2010-02-02 16:30

/\
* Returns 1 if the computer is on. If the computer isn't on, the value returned
  by this function is undefined. *\
/

int is_computer_on(void) {
   int ret;
   return 1?1:ret;
}

/\
* Returns the temperature of the motherboard if the computer is currently
  on fire. If the computer isn't on fire, the function returns some other
  value. *\
/

double is_computer_on_fire(void) {
   double ret;
   return 1?ret:1;
}

Name: Anonymous 2010-02-02 18:26

those comments

Name: Anonymous 2010-02-03 5:28

>>3
frozenvoid quality

Name: Anonymous 2010-02-03 7:37

>>4
Learn to sage

Name: sage 2010-02-03 7:46

>>5
What is there to learn? sage goes in all fields.

Name: Anonymous 2010-02-03 18:04

These have to come in twos:

#include <stdio.h>

void a(void)
{
    int *p;
    *p = 5;
}

void b(int *p)
{
    *p = 2;
}

int main(void)
{
    int i;
    b(&i);
    a();
    printf("
the game lol %d\n", i);
    return 0;
}

Name: Anonymous 2010-02-03 18:07

>>7
three functions

Name: Anonymous 2010-02-03 20:11

>>7
fuck you!!

Name: Anonymous 2010-02-04 2:43

>>7
what is a() for?

Name: Anonymous 2010-02-04 2:52

>>10
it's so that i has enough time to become 2 from b() before it gets passed to printf. just a lil padding time to keep the processor from going too fast, pretty useful

Name: Anonymous 2010-02-04 3:23

>>11
lol'd, nice one

Name: Anonymous 2010-02-04 4:24

>>11
Ah, I see now NOT

Name: Anonymous 2010-02-06 0:26

So, a() does overwrite random shit from the memory or what?

Name: Anonymous 2010-02-06 1:10

>>11,14
Learn C.

Name: Anonymous 2010-02-06 9:19

>>14
Use of uninitialized pointers is undefined behaviour.

Name: ​​​​​​​​​​ 2010-09-09 23:24

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