Find the output of the following …
CBSE, JEE, NEET, CUET
Question Bank, Mock Tests, Exam Papers
NCERT Solutions, Sample Papers, Notes, Videos
Find the output of the following program. Assume all required header files are already being included in the program.
int main()
{
int X[] = { 10, 25, 30, 55, 110 };
int *p = X;
while ( *p < 110)
{
if ( *p % 3 != 0)
*p = *p + 1;
else
*p = *p + 2;
p++;
}
for (int I = 4; I >= 1; I--)
{
cout << X[I] << "*";
if (I % 3 == 0)
cout << endl;
}
cout << X[0] * 3 << endl;
}
Posted by Prachi Jain 5 years, 4 months ago
- 0 answers
ANSWER
Related Questions
Posted by Hanni Pham 1 year, 1 month ago
- 0 answers
Posted by Prawar Narang 1 year, 4 months ago
- 1 answers
Posted by Hanni Pham 1 year, 1 month ago
- 1 answers
Posted by Kandeepan Jothivel 1 year, 4 months ago
- 2 answers
Posted by Priya Shukla 1 year, 3 months ago
- 1 answers
Posted by Syedali Fathima 1 year, 3 months ago
- 1 answers
myCBSEguide
Trusted by 1 Crore+ Students
Test Generator
Create papers online. It's FREE.
CUET Mock Tests
75,000+ questions to practice only on myCBSEguide app