Views : 3,476,295
Genre: Education
Date of upload: Dec 29, 2020 ^^
Rating : 4.958 (826/78,468 LTDR)
RYD date created : 2022-04-09T21:59:45.979984Z
See in json
Top Comments of this video!! :3
I spent decades writing C/C++ code daily, and the best bit of advice anyone ever gave me stuck with me that entire time relating to pointers.
Not sure if it is in this video, as I didn't watch it all ...
When you are reading the declaration of a C/C++ variable, read it right to left in English and the meaning is obvious
e.g. What is a variable defined as ... int * const *
Backward .. it is a Pointer to a constant pointer to an integer
e.g. What is a variable defined as int [] **
Backward .. it is a Pointer to a Pointer to an Array of Integers
Easy :)
737 |
Note about doing stuff like:
int* p;
It kinda make sense to put the star next to the data type... because it's an "Int pointer" named p. This is fine as long as you declare only one variable per line. Some people like to declare multiple variables at once (I don't recommend doing this but it's doable...). If you do so, only the first variable will be a pointer:
int* p1, p2;
p1 will be a pointer to an integer... But p2 is an integer. This is why you should put the asterisk on the variable name instead:
int *p1, *p2;
724 |
I must express the greatest possible gratitude for this course. The material is comprehensive, well-thought out and superbly structured. All of my implicit questions (i.e. "I know that I don't understand something, just not know what") are vanishing rapidly, and I haven't even finished the course yet! Thank you, thank you! To listen to this course was probably one of the best decisions I've made as a first year in university.
66 |
I am studying computer science in school now. And we have C language in our syllabus now - definitely YouTube has taught me way more than my school teachers. And now I am proceeding to learn the intermediate of C language by learning the concept of pointer. I have already seen the first chapter of this video and have found it quite useful. Thanks to the person who have explained every thing on that chapter in an easy way.π
5 |
If you're as confused as me after checking the size of A in the sumOfElements function (around 1:15:27) and finding that it yields 8 instead of 4, note that in x64 architectures pointers are assigned 8 bytes. Since A is technically a pointer in that context and that's why you'll get 8 bytes of size
348 |
@BinYaseen4Life
3 years ago
I feel smarter by just clicking on the video.
3.8K |