Pointers in c | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

Pointers in c

Is pointers used necessarily for some programms or they just speed up and optimize the code? Can I deal with c programming without using any pointers?

29th Jun 2019, 6:18 PM
Lighton
Lighton - avatar
7 Answers
+ 6
Not knowing pointers is kind of a shot in the foot, since they are kind of important. For a long time, I didn't get them either, and now that I do, it's really great. You can change variables with functions, make a function have any return type, and so on
29th Jun 2019, 6:25 PM
Airree
Airree - avatar
+ 5
Without the idea of pointers you wouldn't have some dynamic datastructures too, so they are very necessary for optimizing and abstractioning. They alone do not speed up anything
29th Jun 2019, 6:50 PM
Alexander Santos
Alexander Santos - avatar
+ 3
you can't deal with memory management without pointer
29th Jun 2019, 8:12 PM
✳AsterisK✳
✳AsterisK✳ - avatar
+ 2
So they are USED FOR optimization but you can write slow and unoptimized code in c that do the same work slower (without pointers)?
29th Jun 2019, 9:01 PM
Lighton
Lighton - avatar
+ 1
No. If you didn't read anything, everyone was saying that it doesn't really speed it up, and that you miss out on essencial parts.
29th Jun 2019, 9:03 PM
Airree
Airree - avatar
+ 1
So are pointers important or no?
29th Jun 2019, 9:04 PM
Lighton
Lighton - avatar
+ 1
They are.
29th Jun 2019, 9:04 PM
Airree
Airree - avatar