Which of the following statements about pointers and arrays
Which of the following statements about pointers and arrays is true? The following expressions are identical when ary is an array: *ary and &ary; [0]. The following expressions are identical when ary is an array: *ary and *ary [0]. The name of an array can be used with the indirection operator to reference data. The name of the array is a pointer variable. The only way to reference data in an array is with the index operator. Which of the following statements about pointer arithmetic is truer? Any arithmetic operator can be used to change the value of a pointer. Given a pointer ptr, ptr + n is a pointer to the value n elements away. Pointer arithmetic is a short-hand notation that changes the value that a pointer is referencing. Pointer arithmetic is valid only with pointers to arithmetic variables, such as pointer to integer. Pointer arithmetic is valid only with the name of the array.
Solution
Answer :
5) a) and d) are true
As per the definition of pointer, \" a pointer is a memory an identifier that stores a value & address of that value\". Similarly the name of an array holds a the address & values too.
6)
a) and d) are true
for a: consider the example below:
int *p;
int *a;
p+a;
p-a;
p*a;
p/a;
the value of *p is changing by all arithmetic operators
![Which of the following statements about pointers and arrays is true? The following expressions are identical when ary is an array: *ary and &ary; [0]. The Which of the following statements about pointers and arrays is true? The following expressions are identical when ary is an array: *ary and &ary; [0]. The](/WebImages/42/which-of-the-following-statements-about-pointers-and-arrays-1131676-1761604726-0.webp)