That is not true always. Auto vars can be stored within registers as well. If i am not wrong C standard does not specify exactly storage location for auto's and this is implementation dependent.
ckshivaram wrote :
"For finding the size of the processor you use int, but what is the size of character for a 8 bit controller / processor. By looking at pin diagram of processor how do you find out the size."
Did somebody say that he/she is capable to determine proc size by counting pins?
For better result you can use datasheet when counting pins. Together with pin names you can find size of the proc there as well.
Hai Artem,
My point regarding automatic variable always store in stack segment is TRUE exception for static variables. what you said regarding automatic variables is not correct because if you specify register keyword for a variable then only that particular variable will store in registers.
HAI, Ckshivaram,
Yes, sivaram what you said is correct for finding 8 bit 0r 16 bit processor but one point I have to add here is that based on number of data lines which will be available on pin diagram, based on that you can easily find out .
Hai Eco47,
PLZ refer once again and give me reply.
If C standard does not say any thing about memory segments means where the variables are going to store. My point of view it has memory segments like TEXT OR CODESEGMENT, DATASEGMENT, HEAPSEGMENT, and STACK SEGMENT. One more segment called const segment but we are not frequently talking about it.
Another thing is that size of data types not dependant on processor always dependant on COMPILER.