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

What is protected inheritance?

1012


What are the data types in c++?

896


What are the two types of polymorphism?

1071


What do you mean by inheritance in c++?

1039


Do you know what are pure virtual functions?

1111


what are the iterator and generic algorithms.

1892


Distinguish between a # include and #define.

1091


What are exceptions c++?

997


Distinguish between new and malloc and delete and free().

965


Can java be faster than c++?

1116


Describe the advantage of an external iterator.

996


What is the best c++ compiler?

1077


Write syntax to define friend functions in C++.

1013


Do vectors start at 0 c++?

990


What are the steps in the development cycle?

1045