In C Standard the operator [] is defined as arithmetic expression and used in array notation as well.What is a meaning of a[b]? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 6

In C Standard the operator [] is defined as arithmetic expression and used in array notation as well.What is a meaning of a[b]?

8th May 2022, 5:04 PM
RuBeen Dahal👿
2 Réponses
+ 11
*(a+b) a + *(b) *a + b a + b a[b] is the b-th index in array a. So, the memory address of this element is denoted by *(a+b). Hence, a[b] = b[a] where b is an integer.
8th May 2022, 5:05 PM
RuBeen Dahal👿
0
RuBeen Dahal👿 What does a + *(b) represent? an address, a value? I can't get that expression evaluated without getting an error.
8th May 2022, 5:15 PM
Ipang