Runtime error in the following code

后端 未结 4 2044
北恋
北恋 2021-01-26 10:13

The following code,according to me should run successfully,but fails at runtime.I don\'t get the reason:

 void main()
 {
   int arr[5][3]={1,2,3,4,5,6,7,8,9,10,1         


        
4条回答
  •  面向向阳花
    2021-01-26 10:56

    Here int **p=&m;. p points to m. Then when p = p + 1; p will point to the address next to m (integer). That address may not be accessible.

提交回复
热议问题