LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-01-2004, 12:00 PM   #1
indian
Member
 
Registered: Aug 2004
Posts: 137

Rep: Reputation: 15
how to clear screen in C ?


Hi how to clear screen in C program in Linux environment.In TURBO C we use clrscr() function.I think we don't have some thing llike that in Linux.
secondly I had read some where that using"\033" will also do the job.Is it possible ? How ?
Thanks..
 
Old 10-01-2004, 12:12 PM   #2
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,821

Rep: Reputation: 121Reputation: 121
http://www.linuxquestions.org/questi...threadid=11857
 
Old 10-01-2004, 01:45 PM   #3
coolfrog
Member
 
Registered: Sep 2004
Location: India
Distribution: Slackware 10.0
Posts: 77

Rep: Reputation: 15
Hi,
You acn make a system call by using the system() function.
Just make a function call as follows :
system("clear");
You will have include appropriate header files.
Thats it. 'clear' is command to clear screen on terminal.
Enjoy. By the way i'm an indian too. :-)

Last edited by coolfrog; 10-01-2004 at 01:46 PM.
 
Old 10-01-2004, 10:58 PM   #4
indian
Member
 
Registered: Aug 2004
Posts: 137

Original Poster
Rep: Reputation: 15
Thanks....
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i replace the clear "clear screen" with the cls command thefedexguy SUSE / openSUSE 2 12-02-2005 05:02 PM
chroot not able to clear screen Archite Linux - Security 6 07-13-2004 10:41 AM
clear the screen!!! raven Programming 18 11-24-2003 07:27 PM
Clear the Screen in C++ OrganicX Programming 16 07-23-2003 04:07 PM
How to clear screen? alexzander Programming 1 01-23-2003 08:43 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration