Professional Documents
Culture Documents
c) From the log in build window, find cl.exe and list parameters that are passed to it.
e) From log in the build window, find link.exe and list parameters that are passed to it.
3. Write the code we discussed in "A day in variable's life" slide. Debug the code and use
immediate window (Debug -> Windows -> Immediate) to find the address of the variables
and verify from Memory windows the junk value and set values for each of the variables.
4) 4. Write following code in the app. It is an infinite loop. Put a break point inside of this
loop. When the breakpoint is hit, change the value of i using watch/quick-watch/locals/autos
windows such that it can break out of the loop.
int main()
{
int i = 10;
while (1) {
cout <<"Infinite loop ... you can't break me!" << endl;
if (i > 10)
break;
}
cout << endl;
cout << "You finally broke me!" << endl;
}
Ans :
5) 5. Write following code in your program. Put a conditional break point such that the
breakpoint is hit in the loop after 100 iterations.
int main()
{
for (int i = 0; i < 1000; i++) {
cout << i <<' ';
}
}
Ans :
9)