QUESTION IMAGE
Question
- what will the following programs print on the screen? a) #include <iostream> using namespace std; int main() { int freeze = 32, boil = 212; freeze = 0; boil = 100; cout << freeze << endl << boil << endl; return 0; }
Step1: Analyze variable assignments
First, freeze is initially set to 32, but then reassigned to 0. boil is initially set to 212, then reassigned to 100.
Step2: Analyze output statement
The cout statement prints freeze (now 0), then a new line, then boil (now 100), then a new line.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
0
100