Status
Not open for further replies.
hello

i want to know how the Turbo cpp (yes, the dinosaur one) and g++ give different output:
Code:
a=10
++a + ++a = 24 (g++)  & 23 (TC)
a++ + a++ = 20
++a - a++ = 0 (g++) & -1(TC)

please explain pre and post increment and decrement in this prgs.

also please tell how to obtain output of such prgs

one more thing -> if in expression pre and post increment occure together what is the precedence order??
 

Apple Juice

Broken In
u sud not worry abt dat output. from a compiler to compiler the output get different due 2 de implementation. dat is why TC and gcc giv diff o/p. :mad:

check dis out, i got it from some1
*tinyurl.com/yexbgmy

u sud knoe tc is for nuubs :mad: i dont wants 2 hurts u but dat is de way :(
 
u sud not worry abt dat output. from a compiler to compiler the output get different due 2 de implementation. dat is why TC and gcc giv diff o/p. :mad:

check dis out, i got it from some1
*tinyurl.com/yexbgmy

u sud knoe tc is for nuubs :mad: i dont wants 2 hurts u but dat is de way :(

yep,i want 2 find how the compiler generates it???
 

Apple Juice

Broken In
yep,i want 2 find how the compiler generates it???
uz gcc there you cn pass commandd:
Code:
gcc -S filename.c
you cn alsoo see the output in the filename.s file. it shows assembler o/p wcih teh compiler generates and then links

i dnt knw howw tc generates the code :mad: bt itz 4 nuuub neway :evil::cool: :cool:


:cool:
 
Status
Not open for further replies.
Top Bottom