Suppose I have:
unsafe {
byte* start = GetStartLocation();
int something = start[4];
}
What is something? The value of the memory address 4 bytes down from start?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Say
startpoints to memory location 0x12345678, and memory looks like this:then
somethingequals0x9a.The fact that
somethinghas typeintdoesn’t matter to howstart[4]is interpreted – it gets thebytevalue of the byte 4 locations away fromstart.