At 00:47 2007-05-03, Senthil Kumar wrote:
>I think , this may be the suitable way
>main()
>{
>struct name {
>           int a;
>           int c;
>           char b;
>           float d;
>           };
>struct name *name1;
>int a,b,c;
>a = &name1[0];
>b= &name1[1];
>c= b-a;
>printf("%d",c);
>
>}
>
>difference b/w these two pointers(name1++,name) are
>size of the structure ..

correct, BUT
the question was to write a FUNCTION that acts like sizeof


>
>regards
>---senthil
>
>--- "Victor A. Wagner Jr." <[EMAIL PROTECTED]> wrote:
>
> > At 22:23 2007-05-02, Ratnesh Chouhan wrote:
> > >Hi All,
> > >
> > >   Can anybody tell me how can we write a function
> > which works
> > > exactly like sizeOf of c\c++.
> > >   i mean it should work for primitive type, user
> > defined type ,
> > > var. name , constants , arrays , structures and
> > all the data types
> > > for which sizeOf works.
> >
> > you can't.  Why do you want to try?
> >
> > >
> > >   Thanks and Regards,
> > >   Ratnesh...!!
> > >
> > >   Life is all about Inheritance....!! Think over
> > it.
> > >
> > >
> > >---------------------------------
> > >Ahhh...imagining that irresistible "new car" smell?
> > >  Check outnew cars at Yahoo! Autos.
> > >
> > >[Non-text portions of this message have been
> > removed]
> > >
> > >
> > >
> > >To unsubscribe, send a blank message to
> > ><mailto:[EMAIL PROTECTED]>.
> > >Yahoo! Groups Links
> > >
> > >
> > >
> >
> > Victor A. Wagner Jr.      http://rudbek.com
> > The five most dangerous words in the English
> > language:
> >                "There oughta be a law"
> >
> >
>
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around
>http://mail.yahoo.com
>
>
>To unsubscribe, send a blank message to 
><mailto:[EMAIL PROTECTED]>.
>Yahoo! Groups Links
>
>
>

Victor A. Wagner Jr.      http://rudbek.com
The five most dangerous words in the English language:
               "There oughta be a law" 

Reply via email to