Solution for Exercise 4-5
ex0405
#include <stdio.h> int main() { puts("The secret password is:"); /* puts("Spatula."); */ return(0); }
Output
The secret password is:
Notes
* I typically comment out a statement for debugging purposes. Either the statement doesn't work, or I'm disabling it to check some other aspect of the code.
* The Code::Blocks editor may indent the comment for you. So the code looks like this:
#include <stdio.h> int main() { puts("The secret password is:"); /* puts("Spatula."); */ return(0); }
This format is okay, but it's not as readable as the original solution (top of the page). Especially when you're "commenting out" a statement, put the initial /*
at the start of the line, position zero, so these statements are easy to locate.
Copyright © 1997-2024 by QPBC.
All rights reserved