answersLogoWhite

0

'Clearscreen' is not used in C language. TurboC has a clrscr function (prototype in conio.h).

User Avatar

Wiki User

14y ago

Still curious? Ask our experts.

Chat with our AI personalities

TaigaTaiga
Every great hero faces trials, and you—yes, YOU—are no exception!
Chat with Taiga
ReneRene
Change my mind. I dare you.
Chat with Rene
LaoLao
The path is yours to walk; I am only here to hold up a mirror.
Chat with Lao

Add your answer:

Earn +20 pts
Q: Why Clearscreen in c language is used?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

How do you use the clearscreen command in Microsoft visual c plus plus 6.0?

There is no such "command" in C++, let alone Visual C++. You are probably referring to the Turbo C++ clearscreen function. It is a 3rd party, user-defined function and is therefore not part of the C++ language itself. You can roll your own clearscreen function, of course. The following is merely an example implementation, but note that this function is not cross-platform compatible because it employs platform-specific code. You will also need platform-specific code to reposition the cursor after clearing the screen. As it stands, the cursor will be positioned 1000 characters from the top left of the console (immediately after the last insertion position). #include<iostream> #include<windows.h> // Non-cross platform, Windows only! void ClearScreen( void ) { HANDLE hConsoleOut; CONSOLE_SCREEN_BUFFER_INFO csbiInfo; DWORD dummy; COORD home = { 0, 0 }; hConsoleOut = GetStdHandle( STD_OUTPUT_HANDLE ); GetConsoleScreenBufferInfo( hConsoleOut, &csbiInfo ); FillConsoleOutputCharacter( hConsoleOut, ' ', csbiInfo.dwSize.X * csbiInfo.dwSize.Y, home, &dummy ); } int main() { // print some garbage: int max=1000; while(max--) std::cout<<rand(); ClearScreen(); }


Why you use C language in electronic engineering?

C is a structured language. Controlled structures used in electronic engineering can be programmed well by C. C++ and C sharp are also used sometimes.


What programming language is used in Pokemon games?

c


What is the difference between c and c plus plus extension?

c language is the structure oriented language and c does not follows the object oriented paradigms . c++ obeys the all object oriented language characteristics ========== C++ is a set of extensions to the C language to allow some (not all) principles of object-oriented programming to be used. Originally, C++ was a front end pre-processor for C and C++ compilers will translate C language functions.


Who are the ancestors of C programming language?

programming languages B and BCPL which was used to derive C