adplus-dvertising
frame-decoration

Question

What is the output of this program?
    #include <iostream>
    using namespace std;
    int main()
    {
        int a = 10;
        if (a < 10) {
            for (i = 0; i < 10; i++)
               cout << i;
        }
        else {
            cout << i;
        }
        return 0;
    }

a.

123456789

b.

123456789

c.

0

d.

error

Answer: (d).error

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program?

Similar Questions

Discover Related MCQs

Q. Identify the incorrect statements.

int var = 10;
int *ptr = &(var + 1); //statement 1
int *ptr2 = &var; //statement 2
&var = 40; //statement 3

Q. Identify the type of the variables.

typedef char* CHAR;
CHAR p,q;

Q. Evaluate the following expression:
3 >6&&7>4

Q. Special data types that are defined by users is called

Q. In C++ the words that is already defined and is reserved for a single special purpose, is called as

Q. There are how many relational operator are offered by C++?

Q. Cin stands for

Q. Which from the following is not a relational operator?

Q. C++ allows objects of one type to be used in another type where it is expected, it is called as

Q. How many logical operators are combined to form a compound condition?

Q. Sequence of statements that is treated as a single statement, is called

Q. Which from the following is a relational operator?

Q. Conditional statements can be used within another conditional statements that are called

Q. The actual values defined in the enumeratorlist is called

Q. The logical symbol ! This is used for

Q. The symbol >> is known as

Q. Extraction operator is also known as

Q. This statement {int temp = x; x = y; y = temp ;} is an example of

Q. Variables cannot be used before they are declared, so their scopes begin

Q. Which is the correct syntax for defining an enumeration data type?