Write a program that has an double array intArray[] that has N elements and is initialized with values start from 0 and incremented by 1 and then multiplied by 2. Your task is to print the address of the odd index and its value. [Note: you can define the value of N at least 10 or more] PLEASE DO NOT USE ANY INDEX TO ACCESS ELEMENTS OF THE ARRAY.
Write a
Sample Output:
Elements of intArray:
0 24 6 8 10 12 14 16 18
The address of index 1 is: Ox7ffebe1108c4 and the vlaue holds is 2
The address of index 3 is: 0x7ffebe1108cc and the vlaue holds is
The address of index 5 is: 0x7ffebe1108d4 and the vlaue holds is 10
The address of index 7 is: 0x7ffebe1108dc and the vlaue holds is 14
The address of index 9 is: 0x7ffebe1108e4 and the vlaue holds is 18
Step by step
Solved in 2 steps