main() { const int a; printf("%u",&a); } this cprogram will compile in turboc++ #include"iostream.h" void main() { const int a; cout<<&a; } this c++program will not compile in turboc++.
Hello! I simply wish to give you a big thumbs up for your excellent information you have right here on this post. I'll be coming back to your site for more soon.
Excellent blog here! Also your website loads up fast! What host are you using? Can I get your affiliate link to your host? I wish my website loaded up as fast as yours lol
Excellent post. I was checking constantly this blog and I'm impressed! Very useful info specially the last part :) I care for such information much. I was seeking this particular info for a very long time. Thank you and good luck.
isn;t this a stupid question
ReplyDeleteyep, sounds stupid but tricky though. Btw good reply
ReplyDeletemain()
ReplyDelete{
const int a;
printf("%u",&a);
}
this cprogram will compile in turboc++
#include"iostream.h"
void main()
{
const int a;
cout<<&a;
}
this c++program will not compile in turboc++.
1)We can assign any type of pointer to void pointer without cast in c but not in c++.
ReplyDelete2)
int main()
{
const int i;
}
will not give error in c but in c++.
In c++ We must initlize the const variable .
ReplyDeleteYou can try with const int a=0
Might will work
In c++ We must initlize the const variable .
ReplyDeleteYou can try with const int a=0
Might will work
The "designated initializer" syntax in ISO C99 is not available in C++.
ReplyDeletehttp://stackoverflow.com/questions/1601201/c-struct-initialization-using-labels-it-works-but-how-documentation
http://gcc.gnu.org/onlinedocs/gcc-4.4.1/gcc/Designated-Inits.html#Designated-Inits
Hello! I simply wish to give you a big thumbs up for your excellent information
ReplyDeleteyou have right here on this post. I'll be coming back to your site for more soon.
Here is my web-site - metabolic rate calculator
I definitely liked reading everything that is posted on your website. Where else could anyone get that type of facts in such a perfect way of writing?
ReplyDeletewww.triciajoy.com
Your method of describing everything in this article is in fact pleasant, every one can easily be aware of it, Thanks a lot.
ReplyDeleteExcellent blog here! Also your website loads up fast! What host are you using? Can I get your affiliate link to your host? I wish my website loaded up as fast as yours lol
ReplyDeleteExcellent post. I was checking constantly this blog and I'm impressed! Very useful info specially the last part :) I care for such information much. I was seeking this particular info for a very long time. Thank you and good luck.
ReplyDelete