Révision.C
zouba
-
zouba -
zouba -
Int main()
Void F2(int A,int *B,int *C) ;
Void F3 (int K,int L,int *M) ;
Int main()
{
int X,Y,Z ;X=5 ;Y = 6 ;Z = 8 ;
F2(X,&Y,&Z) ;
Return(0) ;
}
Void F2(int A,int *B,int *C)
{
*C = 3 ;
F3(A,*B,C) ;
A=3 ;
}
Void F3 (int K,int L,int *M)
{
K = 2;
L =9;
*M =K+L;
}
Je demande les valeurs de X,Y,Z a la fin de la fonction main() ?
J’ai trouvé X =5
Y=6
Z=11
Void F2(int A,int *B,int *C) ;
Void F3 (int K,int L,int *M) ;
Int main()
{
int X,Y,Z ;X=5 ;Y = 6 ;Z = 8 ;
F2(X,&Y,&Z) ;
Return(0) ;
}
Void F2(int A,int *B,int *C)
{
*C = 3 ;
F3(A,*B,C) ;
A=3 ;
}
Void F3 (int K,int L,int *M)
{
K = 2;
L =9;
*M =K+L;
}
Je demande les valeurs de X,Y,Z a la fin de la fonction main() ?
J’ai trouvé X =5
Y=6
Z=11
3 réponses
-
<voix stridante> Vous pouvez répéter la question? </voix stridante>
a+
dje-dje -
Salut,
pour X et Y, le résultat est normal puisque tu ne fais aucune opération dessus.
Pour Z, il correspond au résultat de l'addition dans ta fonction F3.
Mais perso, je comprends pas trop l'utilité de ton code.
A+. -
C'est p-e d'apprendre à se servir des pointeurs?
a+
dje-dje