Question : Help me understand sizeof()

what does sizeof return in these 2 instances here?

sizeof( throwDist );
sizeof( throwDist[0] );

thanks.
1:
2:
3:
4:
5:
6:
7:
8:
9:
int main() {

   StudentAttempt throwDist[] = {
      {50, "A"},      {22, "A"},      {16, "B"},      {44, "C"},
      {33, "D"},      {34, "E"},      {22, "F"},      {21, "G"},
      {49, "A"},      { 5, "B"},      { 2, "C"},      {22, "A"},
      {33, "B"},      {22, "C"},      {22, "D"},      {44, "E"},
   };
   int len = sizeof( throwDist )/ sizeof( throwDist[0] );

Answer : Help me understand sizeof()

I believe the the first one returns the size of the array (number of elements) and the second one returns the size of one element in the array.
Random Solutions  
 
programming4us programming4us