What will happen when the following code is run:
int x;
while(x<100)
{
cout<<x;
x++;
}




1) The computer will output "0123...99"


2) The computer will output "0123...100"


3) The output is undefined

Answer Posted / ibrazileasum

The initial value of x is not defined to '0' hence the complier will not start from 0 as initial value. This is a garbage error to the compiler

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is use of overloading?

866


What are the types of abstraction?

783


What is polymorphism give a real life example?

774


what type of questions

1904


What is oops and its features?

838


What is the advantage of oop over procedural language?

853


What are the 3 pillars of oop?

876


What does and I oop mean?

851


What is difference between multiple inheritance and multilevel inheritance?

895


Can we create object of abstract class?

842


What causes polymorphism?

832


Which language is not a true object oriented programming language?

885


What is an example of genetic polymorphism?

883


What is protected in oop?

820


hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me.

1753