Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   64 bit data input in c (http://www.go4expert.com/forums/64-bit-data-input-c-t23670/)

kumardashish 26Oct2010 12:03

64 bit data input in c
 
hi can any one tell me how to take 64 bit input from console through c language.
thakx

xpi0t0s 27Oct2010 13:16

Re: 64 bit data input in c
 
%I64d on Windows.

kumardashish 27Oct2010 17:26

Re: 64 bit data input in c
 
thanx 4 your reply xpi0t0s
actually i have to write a program to calculate the number of 1 present in it's bit field.
input number must be 64bit number.

xpi0t0s 27Oct2010 21:07

Re: 64 bit data input in c
 
OK. I use DWORD64 types in conjunction with %I64d. This is helpful for your project as it's an unsigned type, so you can divide it by 2 without worrying about sign extension.


All times are GMT +5.5. The time now is 15:17.