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 / rakesh
the output is undefined
because c++ do not implicitly initialised the varible. it
gives garbage value for uninitialized variables
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Are polymorphisms mutations?
when to use 'mutable' keyword and when to use 'const cast' in c++
What is Difeerence between List obj=new ArrayList(); and ArrayList obj=new ArrayList()?
c++ program to swap the objects of two different classes
write a code for this. serial_number contained in the header of the file will be read , if this serial number is less than a previous serial number within a successfully processed file, or is the same as another serial number within a successfully processed file, or if the field contains anything other than 7 digits, then the file must error with the reason ‘Invalid SERIAL_NUMBER’.
What are the 3 principles of oop?
Can we have inheritance without polymorphism?
What are the benefits of oop?
What are the 4 main oop principles?
How Do you Code Composition and Aggregation in C++ ?
What is for loop and its syntax?
What is polymorphism and why is it important?
write a program that takes input in digits and display the result in words from 1 to 1000
What do you mean by variable?
Is react oop?