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.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter8: Advanced Method Concepts
Section: Chapter Questions
Problem 7RQ
icon
Related questions
Question

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. 

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

Sample Output:
Elements of intArray:
The address of index 1 is: 0x7ffebe1108c4 and the vlaue holds is 2
0 2 4 6 8 10 12 14 16 18
The address of index 3 is: 0x7ffebe1108cc and the vlaue holds is 6
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: Ox7ffebe1108e4 and the vlaue holds is 18
Transcribed Image Text:Sample Output: Elements of intArray: The address of index 1 is: 0x7ffebe1108c4 and the vlaue holds is 2 0 2 4 6 8 10 12 14 16 18 The address of index 3 is: 0x7ffebe1108cc and the vlaue holds is 6 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: Ox7ffebe1108e4 and the vlaue holds is 18
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Arrays
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning