home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Microsoft Programmer's Library 1.3
/
Microsoft-Programers-Library-v1.3.iso
/
sampcode
/
qc_prog
/
chap03
/
prepost.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1988-04-07
|
394 b
|
17 lines
/* prepost.c -- shows effect of pre- */
/* and post-increments */
/* and decrements */
main()
{
int b = 100;
printf("b is %d\n", b);
printf("b++ is still %d\n", b++);
printf("but after it's used, ");
printf("b is incremented to %d\n\n, b);
printf("++b, on the other hand, ");
printf("is immediately %d\n", ++b);
}