+ 4
sizeof returns the size of the underlaying type not the memory allocated to the variable. Therefore, your len definition always returns 0 (4/4-1=1-1=0.) Line 10 definition of *vec[] is **int while line 31 call using &a is *int. Line 10 should be either *vec or vec[] not both.
30th Jan 2018, 2:58 PM
John Wells
John Wells - avatar