Re: some puzzled questions
kedarnath pathikonda <[email protected]>
| Newsgroups | gmane.comp.programming.cppug |
|---|---|
| Message-ID | <[email protected]> |
1-my first question was not mean that i need to
initialise before main. that is before main is called
by OS.
2-this question does not mean scope resolution
operator alone it means all other operators which
can't be overloaded.
3-one possible way to calulate size of integer is like
try the folowing code
void main()
{
int i = 1;
int j=0;
while(i)
{
i = i<<1;
j++;
}
j=j/8;
printf("sizeof(int) = %d\n",j);
}
not to achive some thing. i found this questions in an
interview.
--- Marcel <[email protected]> wrote:
> 1- what's the problem in calling some kind of
> initializing data function at the begginning of
> main()?
> I think you could create a const global it would be
> initialized before main, but not at run time..
> 2- I don't think scope resoltion would be an
> operator,
> operator are something that operates an variable,
> scope resolution just do that, resolve scope, no
> actions at run time
> 3-I don't see another way without using sizeof() or
> pointer difference..
>
> are these questions for academic purpose or you're
> trying to achive something specific? if so can you
> tell us what is it, maybe we can help you better
>
> marcel
>
> --- kedarnath pathikonda <[email protected]>
> wrote:
>
> >
> > hi
> >
> > here with i have some interesting questions can
> any
> > of
> > you know the answers....
> >
> > 1. i have table which has to be initilized at run
> > time
> > before main is called . can we do this if so, how?
> >
> > 2.in operator overloading there are some operators
> > which can not be overloaded like :: (scope
> > resolution
> > operator)why it can't be overloaded?
> >
> > 3. if we asked to find out the size of an integer
> > with
> > out using size of operator and pointers how will u
> > do?
> >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam
> > protection around
> > http://mail.yahoo.com
> >
> >
> > ------------------------ Yahoo! Groups Sponsor
> > --------------------~-->
> > Make a clean sweep of pop-up ads. Yahoo! Companion
> > Toolbar.
> > Now with Pop-Up Blocker. Get it for free!
> >
>
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/EbFolB/TM
> >
>
--------------------------------------------------------------------~->
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> > [email protected]
> >
> >
> >
> >
> >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/EbFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/cppug/
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/