Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

int *p = NULL;
printf("%1d",p) ;

what will be the output of this above code?

Answer Posted / vasanth

Ans : 0

Since the pointer is having NULL Address,when we try to
print like printf("%1d",*p) it will be giving the exception
hence windows will not accept NULL pointer.

Use cout<<p; then we can print NULL address 0x00000000

Note: the ans is based on VC++ compiler.

Is This Answer Correct ?    18 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When should you use global variables?

1211


What is boyce codd normal form in c++?

1156


Do we have to use initialization list in spite of the assignment in constructors?

999


What is the difference between map and hashmap in c++?

1105


What is the use of endl?

984


What is array give example?

1049


Differentiate between an external iterator and an internal iterator? What is the advantage of an external iterator.

1037


Can we distribute function templates and class templates in object libraries?

1073


Which should be more useful: the protected and public virtuals?

1032


Please explain class & object in c++?

1092


Const char *p , char const *p What is the difference between the above two?

1210


How many characters are recognized by ANSI C++?

1418


What do you mean by vtable and vptr in c++?

1041


Can a program run without main function?

1156


How many types of modularization are there in c++?

1079