You are not logged in.

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

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

Variable Type:

C Programming Quizzes C Language Control Structures

Question:
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

Advertisement
Ads By Google

Re: Variable Type:



Board footer