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() ;
clrscr() ;
}
Example in C++
#include < iostream >
using namespace std ;
int main ( )
{
cout << " The work of Clrscr() ";
system ( " cls " ) ;
return 0 ;
return 0 ;
}
No comments:
Post a Comment
Thanks For Visiting Here...!! I will Reply you as soon as possible.