question regarding the declaration of clrscr()

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sunil lulla
    New Member
    • Jul 2013
    • 1

    question regarding the declaration of clrscr()

    why clrscr() is invoked after variable declaration???? ...
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    Maybe you could post the code where this occurs?

    Comment

    • Gobi Sakthivel
      New Member
      • Jan 2013
      • 26

      #3
      Generally while writing C programs people used to do that, the reason for it in some compilers like Turbo C, the output of the previous program is still there on the output stream to clear those they will use clrscr().For y they using it after after variable declaration, in some OS u have to declare the variables at the beginning of the scope, otherwise it will give some warnings, that's they normally use it after declaring all the possible variables, even u can use the function at the beginning of the scope as well, it ll work with some warnings.

      Comment

      • prpaneru5510
        New Member
        • Jul 2013
        • 1

        #4
        Because clrscr()is a library function which is used to clear the garbages and output from console.

        Comment

        • gaurav19
          New Member
          • Jul 2013
          • 2

          #5
          clrscr() is commonly used while writing a code in C & C++.
          It is mainly used as a library function to clear the screen where output displays.

          Comment

          Working...