Professional Documents
Culture Documents
Exercice 1 :
void printInt(int i) {
int main() {
int i=3;
setInt(&i, 10);
std::cout<<i;
}
Exercice 2 :
int main() {
double i = 1;
double j = 2;
swap(&i, &j);
std::cout << "i : " << i << "\nj : " << j;
return 0;
}
int main() {
double i = 1;
double j = 2;
swap(i, j, i, j);
std::cout << "i : " << i << "\nj : " << j;
return 0;
}
Exercice 3 :
Exercice 4 :
#include <iostream>
int main() {
double matrice1[2][3] = {{1, 2, 3}, {4, 5, 6}};
double matrice2[3][2] = {{7, 8}, {9, 10}, {11, 12}};
double resultat[2][2];
return 0;
}
Exercice 5 :
int fact(int n) {
if(n==0) {
return 1;
}
return n*fact(n-1);
return res;
}
Exercice 7 :