Loops, Conditionals, Array, Pointers

a[]={1, 2, 3, 4, 5}
What is the value of a[1]?
 
1
2
3
4
In C++,
a[]={1, 2, 3, 4, 5}
a[-1]=?
 
5
4
1
Wrong index
In C++, 
a[]={1, 2, 3, 4, 5}
a[x]=5;
x=?
2
3
4
5
What does end() function return?
Iterator to the end of the string
Iterator to the next to the end of the string
Iterator to the previous to the end of the string
None
int function(char a, char b)
What will this function return?
Int
Char
Not fixed
Both
What is Recursion?
Calling same function again and again
Returning same data type again and again
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
Compiler dependent
Error
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?
Do while
While
For
All
{"name":"Loops, Conditionals, Array, Pointers", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"a[]={1, 2, 3, 4, 5} What is the value of a[1]?, In C++, a[]={1, 2, 3, 4, 5} a[-1]=?, In C++,  a[]={1, 2, 3, 4, 5} a[x]=5; x=?","img":"https://www.quiz-maker.com/3012/images/ogquiz.png"}
Powered by: Quiz Maker