thesunboy
asked on
array indexed 11-25
write a program that "creates" an array of int, that consist of 15 elements,indexed by numbers 11 to 25.
the array is to take 15 * sizeof(int)
bytes in memory.(answer has to be in "C" not "C++".
the array is to take 15 * sizeof(int)
bytes in memory.(answer has to be in "C" not "C++".
ASKER
i need to solve it in
c and not c++
c and not c++
ASKER
Edited text of question.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
#pragma warning (disable :4786)
#include <iostream>
#include <map>
using namespace std;
void main()
{
map<int, int> m; // This is a pair of Key & value . They are associated array.
for (int i =11,j=100;i<=25 ;i++,j++)
m[i]=j;
for (i =11;i<=25 ;i++)
cout <<"Key : " << i <<" Value : " << m[i] <<endl;
}