+ 2

Why this code shows warning?How can i get rid from this warning?[This code work very well]

WHILE I AM LEARNING POINTERS CONCEPTS IN C. I FOUND THIS CODE IN SOLOLEARN LESSON. https://www.sololearn.com/learn/C/2933/ WHY THIS CODE KEEP ON SHOWING WARNING.HOW CAN I AVOID THIS WARNING? https://code.sololearn.com/ctY0Un1YNfB8/?ref=app

15th Oct 2020, 10:35 AM
Yogeshwaran P
Yogeshwaran P - avatar
2 ответов
+ 6
The correct format specifier for pointers is %p. The warning is about that the code uses wrong format specifier and the result might be unexpected. %x is hexadecimal representation of unsigned int.
15th Oct 2020, 10:46 AM
你知道規則,我也是
你知道規則,我也是 - avatar
+ 2
Thank you CarrieForle for clarifying my doubt.....
15th Oct 2020, 11:56 AM
Yogeshwaran P
Yogeshwaran P - avatar