Computer Science, asked by Pcavuilati, 10 months ago

Whats wrong with the following code
for ( int k = 2; k = 12; k + = 12) {
cout << k << endl;
}
A. The increment should always be k++
B. The variable must always be the letter i when using a For loop.
C. There should not be a semicolon at the end of the For statement.
D. The condition is incorrect

Answers

Answered by ayushsrivastav111020
0

Answer:

Explanation:

What's wrong in the following statement, provided k is a variable of type int?

for(k = 2, k <=12, k++)

A.The increment should always be ++k .

B.The variable must always be the letter i when using a for loop.

C.There should be a semicolon at the end of the statement.

D.The variable k canât be initialized.

Similar questions