Tag: CS50
-
C: Bitwise Arithmetic in CS50 Week 4
I came into a term called bitwise arithmetic in CS50 week 4 recover walkthrough video by Brian. I do not understand the reason why he use (buffer[3] & 0xf0) == 0xe0. After Googling for a while, I try to explain in my own way. The proper term is known as bitwise masking. 1. Our target:…
-
C: Accessing other memory location addresses that we shouldn’t be
When I try to access memory addresses which are not within the scope of string s, here are some result as below. The address 9, 10 and 11 shown the same char output on s[4], s[5], and s[6] even through they are from different codes. As for accessing location outside of array, it will result…
-
C : Random memory location for variable but constant location for string
While I am doing the Week 4 (Memory) source code exercise, I notice: – Variable address is always changing – String address is always the same. RAM always assign random location to the variable as explain in CS50 lecturer, but I am not sure why string address is always the same. After asking in CS50…