Top Posters
Since Sunday
New Topic  
pagnor pagnor
wrote...
Posts: 1540
6 years ago
What will be the output of the following code segment after the user enters 0 at the keyboard?

   int x = -1;
   cout << "Enter a 0 or a 1 from the keyboard: ";
   cin >> x;
   if (x)
       cout << "true" << endl;
   else
       cout << "false" << endl;

A) true
B) Nothing will be displayed.
C) false
D) x
Textbook 
Database Concepts

Database Concepts


Edition: 7th
Authors:
Read 64 times
1 Reply
Genuine Coder
Replies
Answer verified by a subject expert
bestavinashbestavinash
wrote...
Top Poster
Posts: 675
Rep: 7 0
6 years ago
Sign in or Sign up in seconds to unlock everything for free
More solutions for this book are available here
1

Related Topics

pagnor Author
wrote...

6 years ago
this is exactly what I needed
wrote...

Yesterday
Thanks for your help!!
wrote...

2 hours ago
Good timing, thanks!
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  1306 People Browsing
Related Images
  
 163
  
 1586
  
 245
Your Opinion
Where do you get your textbooks?
Votes: 372

Previous poll results: Who's your favorite biologist?