Let x be an array. Which of the following operations are illegal?
I. ++x
II. x+1
III. x++
IV. x*2
A.I and II
B.I, II and III
C.II and III
D.I, III and IV
Answers
D.
Explanation:
The array is described as an ordered set of comparable statistics objects.
All the statistics objects of an array are saved in consecutive reminiscence places in RAM.
The factors of an array are of the equal statistics kind and every object may be accessed the usage of the equal name.
In each case, they're visualizing rows and columns.
An association of objects, pictures, or numbers in rows and columns is referred to as an array.
It is a five via way of means of four array.
D. I, III, and IV is the correct option.
It is given that x is an array. So, the variable x is going to get the starting address of the array.
For the first and the third option,
The pointer value stored in x cannot be changed because it is a static variable to store the initial address. So it will give an error.
For the fourth option,
As the variable x is an integer pointer variable and it is being multiplied by an integer value which will result in an error.
For the second option,
This statement will just return the next address of the array.