LOOPS AND CONDITIONALS

int a=5;
for(int i=0; i<5; i++){
         i++;
         cout<<a<<endl;     
}
 
How many times the value of a will be printed?
3
2
5
1
int a=2;
int b=3;
if(a<b)
{
  cout<<"a is greater";
}
else{
  cout<<"b is greater";
}
A is greater
B is greater
Error
Compiler dependent
int a=4;
if(a%2)
{
    cout<<"YES"<<" ";
}
else{
    cout<<"NO"<<" ";
}
cout<<"OK";
NO OK
YES OK
OK
Error
Which loop is run for atleast one time?
While
Do while
For
None
{"name":"LOOPS AND CONDITIONALS", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"int a=5; for(int i=0; i<5; i++){          i++;          cout<<a<<endl;      }   How many times the value of a will be printed?, int a=2; int b=3; if(a<b) {  cout<<\"a is greater\"; } else{  cout<<\"b is greater\"; }, int a=4; if(a%2) {    cout<<\"YES\"<<\" \"; } else{    cout<<\"NO\"<<\" \"; } cout<<\"OK\";","img":"https://www.quiz-maker.com/3012/images/ogquiz.png"}
Powered by: Quiz Maker