Views : 1,198
Genre: Education
Date of upload: May 4, 2022 ^^
Rating : 5 (0/62 LTDR)
RYD date created : 2024-05-13T01:39:49.597605Z
See in json
Top Comments of this video!! :3
11:34 wont this program cause buffer overflow into last name if we tried to make the first name bigger size than its supposed to though?
|
This is a great channel. I really wish I found this video months ago. I started learning C with javascript background and it was like a cultural shock but it was fun to code with after some time. I came through buffer overflow bug and I didn t know about it at the time some random variables kept changing. I used sprintf and it corrupted my data for large inputs. This made me hate C as it took me quite a while to figure it out and that freaked me out I didn t even start with node based data structures or guis or frameworks and I was so slow at learning and coding
1 |
So...technically aren't arrays growing downwards as well..I mean their addresses. last name array's address is 8 bytes lower than first name. It's just that the array is being read backwards(upwards) thus it's first element is the last in memory. Also just out of curiosity, do you know why it was designed that way? I mean everything to go downwards in memory but internally arrays to read and store upwards?
Also when using pointer arithmetic to modify an pointer of an array, should we use ++ or -- ? I mean if an array is going upwards in memory thus we should be looking not for the next memory address but the previous?
|
@kunnudev7250
1 year ago
Awesome videos salute to you please continue awesome videos
|