0

Type long long initializing problem

Can't use type long long at all, cause it works like an int. Is long long type has 4 bytes instead of 8?

25th Oct 2016, 8:14 AM
Руслан Худыев
Руслан Худыев - avatar
4 Antworten
+ 1
You can check with sizeof(long long).
25th Oct 2016, 8:31 AM
Zen
Zen - avatar
+ 1
%d is to print a signed decimal integer. Use %ll instead (lowercase L).
25th Oct 2016, 9:45 AM
Zen
Zen - avatar
0
@zen, I checked already and it has 8 bytes. But it still works like 4 byte cause when i initialize Long long a=2147483648; Printf("%d",a); the output is -2147483648 Any ideas?
25th Oct 2016, 8:42 AM
Руслан Худыев
Руслан Худыев - avatar
0
Tried ("%ll",a) and now my output is empty.
26th Oct 2016, 2:50 AM
Руслан Худыев
Руслан Худыев - avatar