r/cprogramming • u/TurtleSlowRabbitFast • 20d ago
Would learning C as my first programming language also be useful for picking up other languages later on? What are your thoughts on this course?
Wanting to learn C as an intro into software engineering. I know it’s low level and I’d like to eventually switch over to high level languages such as JS/TS, Java, and GO.
Does the “The Complete C Programming Bootcamp” course by Byte Garage be a good choice to learn from?
35
Upvotes
View all comments
Show parent comment
2
u/Previous-Box2169 19d ago
I think I got it at the function pointer declaration example! So the syntax highlights that you're getting a variable of that type (say int) after you dereference the pointer, and since you dereference the pointer through the star (*) you should attach the star to the pointer's name (ptr). So the declaration reads "declare a pointer ptr such that, when dereferenciated, becomes an int variable". That's how "int *ptr" makes sense to me now. Now, the "= &a" part is tricky because it looks like normal assignment but it's not making *ptr equal to &a. Instead it's making ptr equal to &a. So you can't really read the whole "int *ptr = &a" and expect it to make sense. It only makes sense as "int *ptr; ptr = &a;", am I right?