Pointers Vs. Multi-dimensional Arrays

Pointers Vs. Multi-dimensional Arrays_第1张图片

Question 3:

Explanation: Since every row in the array a[10][5] can contain only 5 characters, the a[2] element will hold “fello” i.e. 5 characters. There will not be any null character in a[2]. Since, the array is completely intialized, other rows (row a[3] will have only null characters. Hence, printf() using %s specifier will display fello only.

你可能感兴趣的:(sanfoundry)