How do I find the size of a 2D array in C++? Is there any predefined function like sizeof to determine the size of the array?
sizeof
Also, can anyone tell me h
Here is one possible solution of first part
#include using namespace std; int main() { int marks[][4] = { 10, 20, 30, 50, 40, 50, 60, 60, 10, 20, 10, 70 }; int rows = sizeof(marks)/sizeof(marks[0]); int cols = sizeof(marks)/(sizeof(int)*rows); for(int i=0; i