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 the example of polymorphism?

777


How do you define social class?

849


What is encapsulation example?

801


They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?

1653


can we make game by using c

3770


Is this job good for future? can do this job post grduate student?

1942


Where You Can Use Interface in your Project

1645


What is encapsulation and abstraction? How are they implemented in C++?

892


Explain the concepts involved in Object Oriented programming.

908


What is class in oop with example?

862


What are the advantages of polymorphism?

796


How is class defined?

863


What does <> mean pseudocode?

883


what are the different types of qualifier in java?

2054


What are the components of marker interface?

831