Matrix Operation with Pointer | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Matrix Operation with Pointer

Hi Friends, This was a questions in a challenge.Can you explain the parts with * and adding them? Thanks https://code.sololearn.com/cCAjE3iaf9Yc/?ref=app

26th Jun 2017, 7:21 PM
Anil Yilmaz
Anil Yilmaz - avatar
2 Answers
+ 1
*ptr gives you a value that pointer ptr points to. *(ptr + 1) gives you the value of second item in the array Two dimensional arrays could be considered as pointer to pointers. Array name is also a pointer to its first item.
26th Jun 2017, 8:01 PM
soman
0
First addition is for column, secondary one for row.
27th Jun 2017, 9:43 AM
Anil Yilmaz
Anil Yilmaz - avatar