This program is printing the number of every iteration and the address of that variable. That is why it is never the same address
Look at this to see it easier:
i is an integer. b is a char pointer. To inspect the output better, try doing
printf ("%d %d\n",i,b);
i assumes values from -256 to 255. b simply doesn't change (and the address is printed in integer format). Nothing really out of the ordinary.
DARK WEB🕸●➷➹● As mentioned, those are the address stored in char pointer b. The location of where your variable is in the system depends on the compiler, and may vary on each run.
It prints numbers between - 255 to 255 but it is hard to read because right after printing a number it prints the content of b variable witch is an address in hexadecimal form so we can't use %d for that instead we should use %p to print it's actual content.
First two integers are declared (a and i). Then, a pointer variable is declared(b) in which the address of one of the integers (a) is stored. Then a simple for loop is created which iterates from -256 to 255 ie. it iterates 512 times. Then in each iteration, the value stored in the pointer variable(b) and counter variable(i) is printed to the screen.
It prints two numbers without space simultaneously. One is the variable i which varries from -255 to 255 as your instruction in the for loop. Other is address of variable b, which is constand. Since you haven't made any provision for spaces,it is difficult to gather output....