You are on page 1of 3

#ELBAHJAAYOUB 2023 E.

for(i=0,j=1;i<3,j<4;)
EXAMAIN BLANC 2023 {
i++ ;
cout<<A[i]<<"\t"<<A[j]<<"\t";
j++;
Q1 : }
int x,y,z;
x=10; Answers :
y=8;  -2 -2 0 0
z= y + x + ( y++>y)  12 -2 -2 -2 0
//cout<<"end"<<”\t”;  -2 -2 -2 0 0
cout<<z;  -2 -2 -2 -2 0 0

Answers : Q5 :
 Error int x=10 , y=12 ;
 End bool z=x;
 18 x=y;
 End 18 x++;
y=x;
cout<<x<<"\t"<<y<<"\t"<<z;
Q2 :
double a,b,c=1; Answers :
for(b=0 ,a=1;a<3,b<=2;a++,b++)  13 13 1
{  12 13 1
cout<<c<<"\t";  13 12 10
}
 13 13 10
Answers :
 1 2 3 Q6 :
 0 1 2 3 int i,j,s=0;
 1 1 1
 1 1 1 1 for(i=0,j=0;i<=4,j<=4;i++,j++)
{
if (i%j)continue;
Q3 : s+=i;
int x=10 , y=1 ,i=1; }
do cout<<s;
{
i++; Answers :
x+=y;  10
y++;  0
}  Error
while(i<=4 && y==3);
 Nothing
cout<<x<<"\t"<<y;

Answers : Q7 :
 11 3 int A,
 11 4 B[4][6]={1,2,3,4,5,6,7,8,9,0};
 11 2 A=B[2][2];
 12 2 cout<<A;
Answers :
 3
Q4 :
 4
int i, j, A[5]={12,-2,-2,0,0};
 6
 0

I
#ELBAHJAAYOUB 2023 E.B

case 'a' : b=1;


case '3' : a=b;
Q8 : default : d=a;
}
int i,
cout<<a<<"\t"<<b<<"\t"<<d;
B[4][6]={1,2,3,4,5,6,7,8,9,0};
Answers :
for(i=1;i<3;i++)
{  1 1 4
cout<<B[i][i-1]<<"\t";  Error
}  1 1 1
 4 1 4
Answers :
 7 0 0 Q12 :
 2 3 4 int x,y;
 3 4 bool z;
 7 0 x= 1;
y=x++;
Q9 : if(x==2) z=3;
if (y==x) z=10;
Char
else z=8;
i,A[][2]={'j','h','k','h','g','y'};
cout<<z<<"\t"<<y;
i=A[2][1];
cout<<i;
Answers :
Answers :  3 2
 h  10 1
 j  1 1
 y  1 2
 g Q13 :
Q10 : int x=2,y=2;
bool z;
x++;
int i , j ,
++y;
A[]={1,1,2,3,4,5,4,5},B[4];
if (x+y>=6) z=true;
else
for(i=0,j=1;i<=4,j<=3;i++,j++)
z=false;
{
cout<<z<<"\t"<<boolalpha<<z;
B[i]=A[j];
cout<<B[i]<<"\t";
Answers :
}
 1 true
Answers :  0 1
 1 2 3 4  1 1
 1 1 2 3  0 false
 1 2 3 Q14 :
 2 3 4 5 int i=10,j=10,z,w;
Q11 : z= i + (i==j);
w= z>=i || --z== j;
cout<<z<<"\t"<<w;
int a,d;
double b;
Answers :
char c='a';
switch (c)  11 0
{  1 1
case '1' : a=4;  11 1
case '2' : b=3;  9 1

II
#ELBAHJAAYOUB 2023 E.B

Answers :
Q15 :
 1 2 3 4 5 6 7
int x=1,y ;  8 8
y= ++x + x-- ;  0 2 4 6 8 10 12 14
cout<<y++<<"\t"<<y<<"\t"<<x;  2 4 6 8 10 12 14

Answers : Q19 :
 4 4 2
 4 5 1 int i,j;
 3 4 2 i=1;
 3 4 1 j=2;
i++;
Q16 : while (i<7)
i++;
int i=0,a=1;
j++;
cout<<i<<"\t"<<j;
do
{
Answers :
i++;
a+=i--;
cout<<a<<"\t";  6 3
}  6 8
while(i<=3);  7 3
 7 8
Answers :
 2 4 7 11 Q20 :
 Error
 Boucle infini int x,y;
 Rien double w=3.087;
bool q=12;
Q17 : x=w;
q=x;
do
cout<<x<<"\t"<<q<<"\t"<<(int)w;
{
i++;
Answers :
a+=i--;
cout<<a<<"\t";  3 1 3
}  3.087 3.087 3
while(true)  3 12 3
 Autre
Answers :
 2 4 7 11 Exercice :
 Boucle infini Ecriren un programme qui permet
 Error d’obtenir le nombre de nombres
 Rien négatifs et le nombre de nombres
positives présent et les nombres
Q18 ; null dans un tableau T.
T[16]={-1,2,-3,0,7,12,45,0,-1,5} ;
int i,j;

for(i=0,j=0 ;i<=4,j<=7; i++,j++);


cout<<i++<<"\t";

III

You might also like