a) 4 b) 2 c) 3 d) 1 Answer: a Explanation: There are four types of loop. They are ...
View Question
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
int i;
for (i = 0; i < 10; i++);
{
cout << i;
}
return 0;
}
What will be the output of the following C++ code? #include <iostream> ...
View Question
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
int n = 15;
for ( ; ;)
cout << n;
return 0;
}
What will be the output of the following C++ code? #include <iostream> ...
View Question
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
int a = 10;
if (a < 15)
{
time:
cout << a;
goto time;
}
break;
return 0;
}
What will be the output of the following C++ code? #include <iostream> ...
View Question
What will be the output of the following C++ code? #include <iostream>
using namespace std;
int main ()
{
int n;
for (n = 5; n > 0; n–)
{
cout << n;
if (n == 3)
break;
}
return 0;
}
What will be the output of the following C++ code? #include <iostream> ...
View QuestionThe destination statement for the goto label is identified by what label?
a) $ b) @ c) * d) : Answer: d Explanation: colon is used at the end of ...
View QuestionThe switch statement is also called as?
a) choosing structure b) selective structure c) certain structure d) bitwise structure Answer: b Explanation: The switch statement ...
View QuestionThe if..else statement can be replaced by which operator?
a) Bitwise operator b) Conditional operator c) Multiplicative operator d) Addition operator Answer: b
View QuestionHow are many sequences of statements present in c++?
a) 4 b) 3 c) 5 d) 6 Answer: c Explanation: There are ...
View Question
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
main()
{
double a = 21.09399;
float b = 10.20;
int c ,d;
c = (int) a;
d = (int) b;
cout << c <<‘ ‘<< d;
return 0;
}
What will be the output of the following C++ code? #include <iostream> ...
View Question