Professional Documents
Culture Documents
Примерные задачи для Filan Exam (IntroductionToProgramming)
Примерные задачи для Filan Exam (IntroductionToProgramming)
htm
1. What is the final value of x when the code int x; for(x=0; x<10; x++) {} is run?
43. What would be the output from the following C++ code segment?
x=11;
while(x>7){
cout<<x<<"\t";
x--;
}
int i,j;
for(i = 0;i < 5;i ++)
{
for(j = 0;j < 3;j ++ )
{
if(i == 2)
break;
}
}
int i;
for(i = 0; i <= 5;i ++ )
{
cout << i << endl;
}
8. What is the final value of x when the code int x; for(x=0; x<50; x++) {} is run?
10. How many times the current loop will execute? for (int i = 0; i <= 5; i += 3);