+ 3
C- How to iterate elements in array of pointers?
int i=2; float f= 4.5f; char c[5]= "Java"; void *ptr[3]= {&i, &f, &c};
3 Answers
+ 3
Hello Khairul,
What did you mean by iterate? did you mean to use a loop for printing the data refered by the pointers in the array? or is it something else?
Here's how I tried
https://code.sololearn.com/ceb2o921zlKH/?ref=app
+ 4
Thanks Ipang
+ 2
Anytime Khairul đ