Hewlett Packard Interview Question
Software Engineer / Developersi dont think so when you run this code char a[10]; printf("%d",sizeof(a)); this will give you 40 that is actual size of array. one explanation could be . function does not accept array as a whole its just accepts pointers or any other contents as a parameter and in this case a is a pointer not array hence 2
Even though "a" is declared as an array of 10 bytes, "a" is actually a pointer. The function is executed on a 16 bit machine.
- Anonymous August 18, 2011