+ 2
Can anybody tell me y this happening in c language
int main(){ short int a =5; printf("%d"+1,a); getch(); return 0; } this code only prints d explain me why.... not even the value of a that is 5
10 Respostas
+ 4
Here is a example created by modifying the code
https://code.sololearn.com/cQ6C6WeR099N/?ref=app
+ 4
"%d" is of type char*, doing "%d"[1] is 'd'
it is also equivalent to *("%d"+1) so "%d"+1 is the address of 'd'
+ 2
thanks
+ 2
oh.... nice... thanks u guys are awesome
+ 2
Your are welcomed ! :)
+ 1
and what is the difference between %d and %*d
+ 1
It has meaning for scanf only
Adding the * means that the %d will not be read but needs to be here
+ 1
đđđ
0
i did
+2
printed POSIX
+45
printed c
+36
printed 6c
đđđđ
0
đđđđđ
+21
printed-->
ng : : erase