Jump to content

Recommended Posts

Posted

Let's see here:

 

ascii-full.gif

 

--edit--

 

What's the character behind the pole?

 

is it the '\0' symbol?

Posted

Yeah, in C the end of a string is a NUL.

 

If they want to attract the right kind of people, that ad is a good start :)

Posted
dave said in post #8 :

All C/C++ strings are null terminated, which just means they have the ascii code 0 at the end of them.

 

Yeah, in the pic, it looks like a 0. But when I did C programming, i had to use the \0 symbol.

 

Afterall, using 0 would copy 0 into the string right?

Posted

It is a zero, but it's a decimal zero.

 

If you look at the table above, 0 in decimal is the charachter NUL in ASCII, which is represented as '\0' in C source.

 

char a = 0;

 

and

 

char b = '\0';

 

are the same thing.

Posted
LuTze said in post #11 :

It is a zero, but it's a decimal zero.

 

If you look at the table above, 0 in decimal is the charachter NUL in ASCII, which is represented as '\0' in C source.

 

char a = 0;

 

and

 

char b = '\0';

 

are the same thing.

 

doh!

 

pa-choing!

Posted
YT2095 said in post #14 :

NSX, since they`re "Now Hiring" people, go for it dude!

 

89,111,117,32,110,111,32,87,111,114,115,101,32,32,58,41,0

 

huh?

 

Much easier compiling in C than converting. lol

 

#include <stdio.h>

 

int

main (void)

 

{

char str[] = {89, 111, 117, 32, 110, 111, 32, 87, 111, 114, 115, 101, 32, 32, 58, 41, '\0'};

 

printf ("%s", str);

 

return(0);

 

}

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.