#include <stdio.h> int main() { printf("%x",-4>>1); return 0; } | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 2

#include <stdio.h> int main() { printf("%x",-4>>1); return 0; }

Output is fffffffe https://code.sololearn.com/cave4NgSKbpw/?ref=app

17th Mar 2021, 5:58 AM
Ankit Kumar
Ankit Kumar - avatar
3 Réponses
+ 1
I understand it but not understand shift ing of negative number and just output in ffffffff0
17th Mar 2021, 7:48 AM
Ankit Kumar
Ankit Kumar - avatar
+ 1
And fffffffe
17th Mar 2021, 7:49 AM
Ankit Kumar
Ankit Kumar - avatar
17th Mar 2021, 7:39 AM
Slick
Slick - avatar