Question: for ( int i = 0 ; i < 3 ; i + + ) { int y = 3 ; if ( y =
forint i ; i ; i
int y ;
ify
int z ;
cout "Value of z is: z endl;
cout "Value of y is: y endl;
cout "Value of y outside the ifstatement is: y endl;
cout "Trying to access y outside if and forblock, value of y: y endl;
Can this snippet print the value of z
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
