Knowee
Questions
Features
Study Tools

What will be the output of the following code?    int i = 0;    while(i!=15){      cout << i << " ";      i = i + 5;    }

Question

What will be the output of the following code?    int i = 0;    while(i!=15){      cout << i << " ";      i = i + 5;    }

🧐 Not the exact question you are looking for?Go ask a question

Solution

The output of the code will be:

0 5 10 15

Similar Questions

What will be the output of the following code?int num = 2;int count=0;while(num!= 0){if ( num & 01)count ++;num >>=1;}cout<< count;return 0;

What is the output of the following code snippet?int i = 0;while (i < 5) {    if (i == 3)        break;    System.out.print(i + " ");    i++;}

Convert the following while loop to a for loop such that the output remains same.int i = 20;while (i > 0){cout << i << “\t”;i = i - 2;}

What will be the output of the following program?#include <iostream>using namespace std;int main()    {     int x, y;     x = 5;     y = x++ * ++x;     cout << x <<" " << y;     return 0;    }Select one:7  3536  3625  256  49

CWhat is the output of the following piece of code?int i;i = 10;while (i < 20){ printf("%d", i % 2); i++;}

1/3

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.