"Z Code Writer" is an Online Blog for Programmer & Beginner. Here, You will Find tech, Build your Programming Skills and other Programming Language Like C, C++, HTML, Java Script Java Code, Web Designing and University Of Sialkot (USKT) CGPA / GPA Calculator etc.

Saturday, 20 July 2019

The clrscr() Function

The clrscr() Function

      The clrscr() function is used to clear the screen of the monitor. After executing this function, screen function moves to the top-left corner of the screen. This function is defined in "conio.h" header file. This syntax to call this function is as follows:
                clrscr ( ) ;
      Following program clears the screen of the computer monitor.
                # include<conio.h>
                main ( )
                {
                            clrscr ( ) ;
                 }

Example  in C

#include < stdio.h >
#include < conio.h >
void main ( )
{
      printf ( " The work of Clrscr() " ) ;
      clrscr() ;
}

Example in C++


#include < iostream >
using namespace std ;

int main ( )
{
      cout << " The work of Clrscr() ";
      system ( " cls " ) ;
      return 0 ;
}

No comments:

Post a Comment

Thanks For Visiting Here...!! I will Reply you as soon as possible.