I have a pointer to integer array of 10. What should dereferencing this pointer give me?
Eg:
#include<stdio.h>
main()
{
int var[10] = {1,2,3,4,5,6,7,8,9,10};
int (*ptr) [10] = &var;
printf("value = %u %u
",*ptr,ptr); //both print 2359104. Shouldn't *ptr print 1?
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…