Hi ,
I want to know 3 things.
1)In C++ , when we try to delete a this pointer , what will happen? . I tried
to do it . when we call delete , desctructor for that object is called and
again control returns back to member function next line and finished fine.My
assumption is like , the memory for this pointer is not allocated by user , so
we can't delete this. am I correct ?
2)why SIZEOF is an operator not a function? The syntax resembels a function
but still it is an operator . why so? is it like , as the value of size needs
to be known at compile time itself , thatz why it is a operator not a function
or what?
3) Is there any way to find 2 power x when we are provide x , but that has
to happen in single stmt . I tried with shift operators but unable to find out.
Could you please help me out in these.
4) main()
{
printf("%d");
};
In the above , the output I am getting is garbage. But what I am thinking
is as printf is a function and %d is one parameter and no other parameters , it
will push only %d onto stack . so when it starts executing , it will pop only
%d and it won't get any other value from stack to resolve that %d. So May I
know how compiler is giving some garbage , with out stops printing?
Thanks Regaerds,
gopi.k
---------------------------------
Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel
and lay it on us.
[Non-text portions of this message have been removed]