Home > Back-end > Senior c language array defined problem
Senior c language array defined problem
Time:10-09
Accidentally saw a code before C="/4/3/2 1/5/6" [I] Double quotes part can be viewed as an array The desired effect I=1, c=4 Before the bosses expected what you played less than expected
CodePudding user response:
Theoretically possible, maybe it's a different compiler to handle different, LZ, what kind of results and different expectations? "/4/3/2/1/5/6" is a string constant pointer, pointer [I] is to take the ith element, equivalent to Const char * p="/4/3/2/1/5/6"; C=p [1];