Which looks better? do { //stuff } while (condition); or do { } while (condition); or do { } while (condition); also, which is better looking? typedef struct { //fields } my_object; or typedef struct { //fields } myobject; or typedef struct { //fields } myobject;
do { } while (condition);
It's really subjective and only up to personal preference. I prefer the second form of both for best readability.
As opiesche has mentioned it is subjective, and really a matter of opinion. I personally like... do { this; } while (condition); This may just be because it is what I am used to seeing. I have worked with many programmers on various projects outside of school and programmers' code is almost always (at least from what I've seen) in that form. You may enjoy this wikipedia page about indenting styles... http://en.wikipedia.org/wiki/Indent_style
Join our real-time social learning platform and learn together with your friends!