ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
But I do not have any output from this code. I tried that if I do not use loop, I can get output. So, what's wrong with the loop and how could I revise it to see the output? (I still need to use the loop to simplify my problem. The array in my real problem contains too many elements)
Thanks!!!
Last edited by cristalp; 12-06-2011 at 02:03 PM.
Click here to see the post LQ members have rated as the most helpful post in this thread.
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,500
Rep:
You don't need braces, if you only have a single statement for the 'for' loop to execute. With multiple statements, it's the only way to know when the 'for' loop ends.
You don't need braces, if you only have a single statement for the 'for' loop to execute. With multiple statements, it's the only way to know when the 'for' loop ends.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.