You are not logged in.

#1 2015-09-15 05:42:17

User RankUser RankUser RankUser RankUser RankUser Rank
From: Chichawatni,Pakistan
Registered: 2014-10-03
Posts: 8,129

Variable Type:

C Programming Quizzes C Language Control Structures

What's wrong in the following statement, provided k is a variable of type int?
for(k = 2, k <=12, k++)

Option A):
The variable k cant be initialized
Option B):
There should be a semicolon at the end of the statement
Option C):
The variable must always be the letter i when using a for loop
Option D):
The commas should be semicolons

Correct Answer is Option D):
The commas should be semicolons

You cannot discover the new oceans unless you have the courage to lose the sight of the shore.

2015-09-15 05:42:17

Ads By Google

Re: Variable Type:

Board footer