Above example what I did is, just print the __int64 number into an string using sprint function. And using strlen of string library just find the length of the string.
__int64 i = 1099897826746536290;
printf("Digits : %d\n",strlen(digits)-1);
Wednesday, May 14, 2008
number of digits in int64
Last time I have given an example of how to use an __int64 number at gcc or vc6 here http://icfun.blogspot.com/2008/04/use-of-int64-variable-in-c.html. Today I'm going to explain how to find the number of digits from a given int64 number. This is easy. Just follow the below example.
This little piece of code will help you to get the function name programatically. This is very helpful when you are implementing the debug...
Many other programming languages, Python does have the comparator facility to sort a list according to your need. You can define a customize...
Actually there is no specific variable existence like string, integer, etc at Perl. All are called Scalar, and it takes all at the same time...