Hello everyone!!!
Today, I started using pointers in C language and I have a problem in the output.
I have this
[
^]
error[
^]
I tried to change %d to %ls as it says ,but in the output it doesn't show me the addresses .
Where the problem is?
Thanks in advance !!!
What I have tried:
Code:
#include <stdio.h>
int main()
{
int x;
int *p;
p = &x;
*p = 75;
printf("price of x = %d ,\t price of pointer p = %d ,\t address of x => %d ,\t address of pointer p = %d \n" , x , *p , &x , p);
x = 999;
printf("price of x = %d ,\t price of pointer p = %d ,\t address of x => %d ,\t address of pointer p = %d \n" , x , *p , &x , p);
*p++;
printf("price of x = %d ,\t price of pointer p = %d ,\t address of x => %d ,\t address of pointer p = %d \n" , x , *p , &x , p);
return 0;
}