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

Pages: 1-

Why doesn't strcmp() return 0?

Name: Anonymous 2007-10-18 22:44

#include <stdio.h>
#include <string.h>

int main(void)
{
    printf("%d\n", strcmp("Hello", "HeIIo"));
    return 0;
}

Name: Anonymous 2007-10-18 22:51

why doesn't trolls try harder?

Name: Anonymous 2007-10-18 23:27

>>1
Maybe your standard library has a bug. They're definitely the same string. I even copied it into my MS Word (I always code in Word XD) to check it with a different font (Arial).

Name: Anonymous 2007-10-19 0:45

ask strerror()

Name: Anonymous 2007-10-19 1:24

use strncmp() moron, this function to the C functions that must be avoided.

Name: Anonymous 2007-10-19 1:27

>>1
Why can't you fucking spell «Hello» properly?  It's h-e-l-l-o, not h-e-i-i-o.
My other troll is somewhat funny.

Name: Anonymous 2007-10-19 1:57

strcmp("Hello", "HeIIo")
boths strings are the same so it returns 1 for true of course

Name: Anonymous 2007-10-19 3:10

This is a terrible troll attempt. You should be ashamed.

Name: Anonymous 2007-10-19 13:49

>>8
I lol'd. You don't have to troll /prog/ to get the same results.

Name: Anonymous 2007-10-19 13:54

>>5
You're confusing it with strcpy()

Name: Anonymous 2007-10-19 14:03

HEY GUYS, I THINK THIS GUY IS TRYING TO TRICK US.

THE STRINGS AREN'T THE SAME, HE'S USING AN UNICODE CHARACTER OR SOMETHING.

WTF?

Name: Anonymous 2007-10-22 5:35

This thread delivers

Name: Anonymous 2007-10-22 23:49

>>1
Because your brain points to null.

Name: Anonymous 2007-10-23 4:31

heiio worid

Name: Anonymous 2007-10-23 6:20

>>11
epic

Name: Anonymous 2007-10-24 12:03

that function has a better chance of returning 0 than a guy has a chance of surviving a dive from the 101st floor of the wtc south tower

Name: Anonymous 2007-10-24 21:45

hey thats not funny my brother died that way.

Name: Anonymous 2007-10-25 0:29

>>17
Link?

Name: Anonymous 2007-10-25 0:52

Name: Anonymous 2007-10-25 2:38

Name: Anonymous 2007-10-25 15:22

>>1
Because RTFM. The function doesn't return a boolean value, but the difference of the two strings.

Name: Anonymous 2009-08-16 23:42

Lain.

Name: ​​​​​​​​​​ 2010-09-09 15:24

Name: Anonymous 2010-12-17 1:35

Are you GAY?
Are you a NIGGER?
Are you a GAY NIGGER?

If you answered "Yes" to all of the above questions, then GNAA (GAY NIGGER ASSOCIATION OF AMERICA) might be exactly what you've been looking for!

Name: Anonymous 2011-02-03 3:31

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