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

Write a short code using c++ to print out all odd number from 1 to 100 using a for loop

972


How are the features of c++ different from c?

1015


What is a storage class used in c++?

1023


Why c++ is not a pure oop language?

986


Mention the purpose of istream class?

1062


What is the full form nasa?

1031


Define 'std'.

1125


Which programming language is best to learn first?

1008


What is a terminating character in c++?

1321


What are single and multiple inheritances in c++?

1032


What does new in c++ do?

964


Is c++ faster than c?

978


Should the this pointer can be used in the constructor?

971


Where can I run c++ program?

1008


How do you declare a set in c++?

911