Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

The elements are store at contiguous memory locations in C++

#include <iostream>
using namespace std;

int main()
{

	int array[5], i;

	cout << "Size of integer in this compiler is "
		<< sizeof(int) << "
";

	for (i = 0; i < 5; i++)
	
		cout << "Address array[" << i << "] is " << &array[i]
			<< "
";

	return 0;
}
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #The #elements #store #contiguous #memory #locations
ADD COMMENT
Topic
Name
7+8 =