<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<META content="MSHTML 5.00.2314.1000" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff>
<DIV>hello all,</DIV>
<DIV> </DIV>
<DIV>please see this code</DIV>
<DIV> </DIV>
<DIV>struct somestruct</DIV>
<DIV>{</DIV>
<DIV> int a;</DIV>
<DIV> char b;</DIV>
<DIV> char c;</DIV>
<DIV>}stvar;</DIV>
<DIV> </DIV>
<DIV>int main()</DIV>
<DIV>{</DIV>
<DIV> printf("%d",sizeof(stvar));</DIV>
<DIV>}</DIV>
<DIV> </DIV>
<DIV>the o/p is 8. i was expecting 6 as 'a' occupies 4 bytest and
'b','c' </DIV>
<DIV>one byte each ! how is it 8 ??</DIV>
<DIV> </DIV>
<DIV>Thanks, </DIV>
<DIV>Srinath</DIV></BODY></HTML>