Académique Documents
Professionnel Documents
Culture Documents
Exercice 2 : What does each of the following program calculate (or do) ?
#include <stdio.h> #include <stdio.h> #include <stdio.h>
#define SIZE 5 #define SIZE 5 #define SIZE 5
int main () { int main () { int main () {
int i , j; int i , j; int i ;
int A[SIZE][SIZE] ; int A[SIZE] ; int A[SIZE], B[SIZE], C[SIZE] ;
printf("Enter the values of A\n");
for(i=0; i<SIZE; i++) for(i=0; i<SIZE; i++) for(i=0; i<SIZE; i++) scanf("%f", &A[i]) ;
for(j=0;j<SIZE;j++) A[i]=i ; printf("Enter thev alues of B\n");
A[i][j]=0 ; for(i=0; i<SIZE; i++) scanf("%f", &B[i]) ;
} } for(i=0; i<SIZE; i++) C[i]=A[i] + B[i] ;
return 0;
Program a Program h } Program c