We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
hi i wrote this code which is written bellow when ever i check the value of u it appear to be the 3. while it is supposed to be 8. Can any body tell me what is the problem with this code and how can i get the exact size of the arrgument of func.
void main(){ func("fara.txt"); } void func(unsigned char arr[]){ int u; u=sizeof(arr); }
"It is left as another excercise for the student to explain why u and v receive different values in the above example..." In case the student is left even more confused by this: u==13 //Includes null terminator v==12 //Doesn't include null terminator