Skip to content

Commit

Permalink
Add exercice construction
Browse files Browse the repository at this point in the history
  • Loading branch information
tony-maulaz committed Feb 8, 2022
1 parent 4ddc385 commit 96a5da7
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions ex50-constructeur.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,29 @@ int main()
Test t(2.34, 12,8);
t.plot();
}
```

# Ex 5
Quel est l'affichage du programme suivant ?

```cpp
#include <iostream>
using namespace std;

struct Test{
Test(){ cout << "Test is construct" << endl; }
};

int main()
{
cout << "Test construction" << endl;
cout << "Case 1" << endl;
Test t[3];

cout << "Case 2" << endl;
Test* pt[3];

cout << "Case 3" << endl;
pt[0] = new Test();
}
```

0 comments on commit 96a5da7

Please sign in to comment.