Hi don't post the same question in different different ways. Y do you simply bring your points down. You may not be able to ask some other Q's later.
My answer:
You see the second one should be a condition and not a meaning less error free expression. Its all programmers responsibility to check the accuracy. If it is error free it will compile and run, that's it. It wont see the sense and all. The C compiler is like that. Its much flexible but you should be a real expert to handle it properly.
Don't waste your points with these duplicate questions here after.In c languages for(;0;) this is the valid one.but 0 is false but in c language it will be executable why?
See the for loop works in the way that after initialization it checks the condition. After that it executes the body. The initialization and increase fields are actually optional. So, if you put in your above statement its a valid statement however, since the condition is zero any body in it should not get executed. You can try putting a print statement as the body for the for-loop. No output is expected.
Check out the website for more details.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment