answersLogoWhite

0

int main()

{

int array[3][3];

int i;

for(i=0; i <9;i++)

{

printf("the element is %d\n", array[i/3][i%3]);

}

return 0;

}

User Avatar

Wiki User

12y ago

Still curious? Ask our experts.

Chat with our AI personalities

ProfessorProfessor
I will give you the most educated answer.
Chat with Professor
TaigaTaiga
Every great hero faces trials, and you—yes, YOU—are no exception!
Chat with Taiga
DevinDevin
I've poured enough drinks to know that people don't always want advice—they just want to talk.
Chat with Devin

Add your answer:

Earn +20 pts
Q: How do you access 2D array elements by using single variable?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Basic Math