+ 1

Different of the %d %i in the c language.

C language

28th Jun 2020, 3:58 AM
N.A.W.Wickramasinghe
N.A.W.Wickramasinghe - avatar
3 Respuestas
+ 6
%i - integer %d - signed decimal integer
28th Jun 2020, 3:59 AM
Gordon
Gordon - avatar
+ 4
%i recognizes and parses base notation for input in octal (0<number>) and hexadecimal (0x<number>), %d only accepts base 10 numbers. Both %i and %d accepts sign symbol (+ and -). * More about input format specifiers 👇 http://www.cplusplus.com/reference/cstdio/scanf/
28th Jun 2020, 4:18 AM
Ipang
+ 1
Thanks bro. I will try it.
28th Jun 2020, 4:54 AM
N.A.W.Wickramasinghe
N.A.W.Wickramasinghe - avatar