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

What is structure of c program?

1161


Is array a primitive data type in c?

1055


write a program fibonacci series and palindrome program in c

1040


What is function prototype in c with example?

1076


Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above

1139


Tell us two differences between new () and malloc ()?

1185


Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?

2543


How many bytes is a struct in c?

1166


Ow can I insert or delete a line (or record) in the middle of a file?

1003


Why is c called "mother" language?

1284


How do I round numbers?

1008


In C, What is the #line used for?

2203


What is c system32 taskhostw exe?

1024


.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }

1294


What is wild pointer in c?

1071