IQOD #3

Posts 16–24 of 24 · Page 2 of 2
Quote Originally Posted by lalakijilp View Post
hoeland duurt het voordat je de basis goed hebt?
maandje ofzo, en dan moet je nog met de basis van hacken beginnen ;p
Ok since everyone else already answered I'm just going to guess that "a+1" sends a decimal value instead of a octal or hex value and so some garbage value would be printed and then another garbage value.

EDIT:
Hmm guess not must do some automatic type conversion.
Quote Originally Posted by why06 View Post
Ok since everyone else already answered I'm just going to guess that "a+1" sends a decimal value instead of a octal or hex value and so some garbage value would be printed and then another garbage value.

EDIT:
Hmm guess not must do some automatic type conversion.
Your answer is: incorrect

Quote Originally Posted by why06 View Post
Oh. I see I thought it would do something weird like 0x42314 + 1 = 0x42315 but since the array points to int values it would actually need to be + 16 or +32 depending if it was a short or long in value. So that if you pointed to this address you would just get some garbage value because its not a whole int.
size of an int is 4, so if a is at 0x42314, a+1 would be 0x42318
a is an array if you outputed it will give you the address in the memory of the array. Say a is 0x42313 then (a+1) is 0x42314 but *(a+1) would give you the value in the memory which would be 2.
Quote Originally Posted by zhaoyun333 View Post
a is an array if you outputed it will give you the address in the memory of the array. Say a is 0x42313 then (a+1) is 0x42314 but *(a+1) would give you the value in the memory which would be 2.
Oh. I see I thought it would do something weird like 0x42314 + 1 = 0x42315 but since the array points to int values it would actually need to be + 16 or +32 depending if it was a short or long in value. So that if you pointed to this address you would just get some garbage value because its not a whole int.
Quote Originally Posted by Hell_Demon View Post
starting with my 7th year on 5th of october, i got a C++ book with which i started when i turned 10
An answer like that assumes i know how old you are =)
Quote Originally Posted by zeco View Post
An answer like that assumes i know how old you are =)
starting with my 7th year on the 5th of october, i started coding when i turned 10. is my logic wrong or does that mean i turn 17 the 5th of october(and it being my 7th year in C++)
Quote Originally Posted by Hell_Demon View Post
starting with my 7th year on the 5th of october, i started coding when i turned 10. is my logic wrong or does that mean i turn 17 the 5th of october(and it being my 7th year in C++)
And here in lies the problem. I thought by 7th year, you meant your grade or something :/

And haha, you got a c++ book for your birthday? Lucky =D
Quote Originally Posted by zeco View Post
And here in lies the problem. I thought by 7th year, you meant your grade or something :/

And haha, you got a c++ book for your birthday? Lucky =D
ah ok, sometimes i hate the way writing words cant explain it in the same way as saying it out loud ^^
Posts 16–24 of 24 · Page 2 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

Talk with us