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...

Write code for atoi(x) where x is hexadecimal string.

Answer Posted / audrius

long l = strtol(string, NULL, 16);
//or, if you need unsigned (which you usually do with hexes)
unsigned long ul = strtoul(string, NULL, 16);

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When the macros gets expanded?

1339


Can we change the value of static variable in c?

971


Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?

1079


What is Dynamic memory allocation in C? Name the dynamic allocation functions.

1334


What is wrong with this initialization?

955


What is the use of sizeof?

969


Why is void main used?

1035


What is scope and lifetime of a variable in c?

989


Explain bitwise shift operators?

1171


What is a macro, and explain how do you use it?

1016


How can I pad a string to a known length?

969


What is sorting in c plus plus?

926


How many types of errors are there in c language? Explain

926


What are the __date__ and __time__ preprocessor commands?

1040


Why does this code crash?

1027