clrscr is usually given after declaration of variables. why ?
Expand Post »
clrscr() is usually given after the declaration of all variables. If it is given before the declaration(of variables), the compiler points out an error. Why is this due to ? Will there be any problem in allocating the required amount of memory if at all clrscr() is given before the declaration?
Re: clrscr is usually given after declaration of variables. why ?
If the answer is not in your text book then you need a different book! But I'm sure its in the book, you just need to study the sections about C language program structure.
thanks for your response. but can u please tell me why executable statements cant be given before variable declaration ?
Yes -- because the iso standards say so. I have read that this requirement is going to be relaxed in the next revision of the standards, but no compilers have implemented that yet (for obvious reasons)
Last edited by Ancient Dragon; May 27th, 2009 at 8:30 am.
Yes -- because the iso standards say so. I have read that this requirement is going to be relaxed in the next revision of the standards, but no compilers have implemented that yet (for obvious reasons)
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.