4 ms·
Actually, my copy of the second edition K&R seems to have the opening brackets on new lines when it comes to function declarations, so: main () { but: while (
by msl 15y ago
Actually, my copy of the second edition K&R seems to have the opening brackets on new lines when it comes to function declarations, so:
main ()
{
but: while (){
and: if(){
I don't have a copy of the first edition at hand but I seem to remember that it uses this same style.
//msl
- vsrinivas 15y agoThe first edition has opening brackets for functions on a new line. It also used a space before parenthesis for while loops and conditionals. Return types, when required, were on the same line as a function name.