output of the following C++ code with justification
.
for(i=5;k=5;++1)
{
cout<<"t"<<i;
if(i=3)
break;
}
.
Correct answer will be marked as brainliest.....
Answers
Answered by
0
Answer:
error
Explanation:
There are some errors in the above question.
1. loop is initialised at both i and k but final value is not given which will lead to infinite loop but ++1 is used, however the operator ++ is used with variable only not constants.
2. = is used as comparison operator but it's assignment operator == is used as comparison operator
3. if we consider these are typo then other mistake is that for(I=5,k=5;I<10,k<10; I++,k--)
we should declare multiple variables inside for loop separated by comma not semi colon
hope I am clear with my solution. thanx
Similar questions