attached is a program that has a character pointer and a [12][10] character arra
ID: 3535713 • Letter: A
Question
attached is a program that has a character pointer and a [12][10] character array named monthName that contains the names of the month the program also prints out the array using the array name and the index
add the code to the program such that the character pointer points to the monthName array and use the pointer only to print out the month names (just like the output of printing the month names using the array name)
char* pch;
char monthName[12][10] = {
{"January"},
{"February"},
{"March"},
{"April"},
{"May"},
{"June"},
{"July"},
{"August"},
{"September"},
{"October"},
{"Novermer"},
{"December"}
};
for (int row=0; row<12; row++ )
{
cout << monthName [row ] << " ";
}
cout << " ";
system("pause");
return 0;
} // end main
Explanation / Answer
please rate
http://ideone.com/1Og17h
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.