Hewlett Packard Interview Report
- 0of 0 votes
Answersint a[10]; a[-1] = 20;
where is 20 stored?
- Varun November 22, 2011 in India
I said this won't compile in C under normal circumstances, he agreed, and then said let's assume C allows this, what happens?? I said maybe then previous local variable of the function will get overwritten with this value.?? Nay insights?| Report Duplicate | Flag | PURGE
Hewlett Packard C - 0of 0 votes
Answerschar *p=NULL; p = (char *) malloc(10); p++; free(p)'
What happens, is there a leak?? are 10 bytes freed??
- Varun November 22, 2011 in India
I answered yes.| Report Duplicate | Flag | PURGE
Hewlett Packard C
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.