Output of the program,intresting..

void main() {
int ii;
clrscr();
printf("ii=%d\n",ii);
ii=12;
printf("%=%d\n",ii);
printf("%i=%d\n",ii);
}


my solution book says the output of line no 7 is

%=%d

I doubt that why any garbage value is not printed in place of %d.
plz suggest!.
Why not try it and see what actually happens?

http://ideone.com/FsG9b
well i tried and the output came as %=%d..
but i want to know why is it like that?
Unable to understand the concept!
It doesn't come out as that. The output is on the page I linked to:

ii=0
%=12
12=-1079093808


at which point the program crashes.

The first line is just some starting value of ii.
The second line is pretty clear.
The third line is the value off ii, and then a random value because the code doesn't provide a value to output, and then a crash.

%=%d does not come out.

I expect you're using an ancient, bug-ridden C compiler. Switch to something made in the last decade.
Last edited on
Oh.Thanx can u give me the link from where i can download a latest version?
Topic archived. No new replies allowed.