What's wrong in this code?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
7th Oct 2022, 9:46 AM
Kaustubh Dhage
1 Answer
+ 1
Closing brace } missing... Also incompatible format specifiers you are using... Corrected code : #include <stdio.h> int main() { int age=22; int _age =23; int *ptr = &age; int *_ptr = &_age; printf("%p, %p diffrence = %lx \n" , ptr, _ptr, ptr - _ptr); _ptr = &age; printf ("comparision= %d\n " , ptr ==_ptr); return 0; }
7th Oct 2022, 10:15 AM
Jayakrishna 🇮🇳