What is the the different: 1. Ptr is an array of 12 pointers to integer. 2. Ptr is an array of 12 integer pointers? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 1

What is the the different: 1. Ptr is an array of 12 pointers to integer. 2. Ptr is an array of 12 integer pointers?

11th Sep 2022, 6:04 AM
Oliver Pasaribu
Oliver Pasaribu - avatar
1 ответ
0
I think sololearn must revise this question in code challenges session. Both option have similar meaning, and adopted in many programming books or authors. Supposed we write: int *ptr[12]; It means we are allocatting array of 12 pointer-to-integer or we are allocatting array of 12 integer-pointer or 12 pointer of integer data type.
11th Sep 2022, 7:09 AM
Oliver Pasaribu
Oliver Pasaribu - avatar