we don’t know the value of a[0]. suppose a[0] = some junk value 21586

= 21586 – 21586 + 1 + 3
= 1 + 3
= 4

if we declare an array as A[10]. then A contains the address of the 1st element of that array. that means A is a pointer. but it is a read-only pointer. however, as A is a pointer so *A is the value of the 1st element of that array.
* operator on pointer has a higher precedence than + or -. so *A+1 means (*A)+1. so whatever the value of A[0], it has been added and then subtracted. tar mane tal diya abar tal niya neoa hoiche. so oi tal niya matha ghamanor kichu nai :p baki 1 + 3 er folafol ase 4. eibar bujha geche?

Output: 4

answer is 4 but I can’t understand why the answer is 4 Please explain detail.

Simple:

*a+1-*a+3

= (*a) + 1 – (*a) + 3

= a[0] + 1 – a[0] + 3

= a[0] – a[0] + 1 + 3

we don’t know the value of a[0]. suppose a[0] = some junk value 21586

= 21586 – 21586 + 1 + 3

= 1 + 3

= 4

if we declare an array as A[10]. then A contains the address of the 1st element of that array. that means A is a pointer. but it is a read-only pointer. however, as A is a pointer so *A is the value of the 1st element of that array.

* operator on pointer has a higher precedence than + or -. so *A+1 means (*A)+1. so whatever the value of A[0], it has been added and then subtracted. tar mane tal diya abar tal niya neoa hoiche. so oi tal niya matha ghamanor kichu nai :p baki 1 + 3 er folafol ase 4. eibar bujha geche?

ekhon bujhlam ..😀

4

4