#include <iostream>

int main()
{
	char a[] = {2,3,4};
	char b[3][5];
	char *x;
	char ch;

	std::cout << "Sizeof char[3]: " << sizeof(a) << std::endl; // 3*sizeof(int)

	std::cout << "size: char b[3][5]: " << sizeof(b) << std::endl; // 3 * 5 * sizeof(char)
	std::cout << "sizeof b[0]:  " << sizeof(b[0]) << std::endl; // 5 * sizeof(char)

	x = b[0];
	ch = 'a';

	// This shows that b is a contiguous block of memory.
	for (int i = 0; i < sizeof(b); ++i)
		*x++ = ch++;

	for (int i = 0; i < 3; ++i )
	{
		std::cout << "b[" << i << "] ";
		for ( int j = 0; j < 5; ++j )
			std::cout << b[i][j];
		std::cout << std::endl;
	}


}
