Do jagged arrays exist in C/C++?

In C I would use an array of pointers.

For instance:

int *jagged[5];

jagged[0] = malloc(sizeof(int) * 10);
jagged[1] = malloc(sizeof(int) * 3);

etc etc.

Leave a Comment