Jump to content

EA Canada


blike

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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);

 

}

Link to comment
Share on other sites

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.