Fig02 cpp


// Fig. 2.14: fig02_14.cpp

// Preincrementing and postincrementing

#include <iostream.h>

int main()

{

int c;

c = 5;

cout << c << endl; // print 5

cout << c++ << endl; // print 5 then postincrement

cout << c << endl << endl; // print 6

c = 5;

cout << c << endl; // print 5

cout << ++c << endl; // preincrement then print 6

cout << c << endl; // print 6

return 0; // successful termination

}

0x08 graphic

5

5

6

5

6

6



Wyszukiwarka

Podobne podstrony:
cpp 2
cpp z ccfd, pocpp lab7
FIG02
dane w pigulce 2 cpp
FIG02
FIG02
FIG02
Lab3 Cpp GPS opis
borland cpp builder cw10
borland cpp builder cw13
Lab cpp 12
borland cpp builder cw9
CPP i CPA dla IIA
FIG02
Programowanie obiektowe, CPP program, 1
Cpp 2, Sortowanie
wyklad5.cpp, JAVA jest językiem programowania obiektowego
borland cpp builder cw2
FIG02

więcej podobnych podstron