473,465 Members | 1,444 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

starting new program with clear screen

1 New Member
i want to start a program in turbo c after first program but when i write second proram and execute it, it also shows output of previous program
what to do..?
Oct 15 '14 #1
2 1281
weaknessforcats
9,208 Recognized Expert Moderator Expert
The console stdout of a C program imitates a 1968 computer's console typewriter where the paper is fed from a roll and just scrolls out. That is why there is no erase console capability in C.

You have to write that yourself or it may be you can use some non-standard method of making a system call. Here you might be able to call system() and provide a argument to execute on the console command line. You would need to research this for your compiler and operating system.
Oct 15 '14 #2
donbock
2,426 Recognized Expert Top Contributor
You can print several newlines before your program does anything else. This will serve to separate the outputs of the program invocations.
Oct 15 '14 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: NeoPhreak | last post by:
How would you clearn the screen in a console program??? Thanks NeoPhreak >.<
0
by: Peter | last post by:
I am just trying to learn python, to use for some fairly basic command line utilities which will run in either Windows/DOS or Linux. I cannot find a platform neutral way of manipulating the screen....
20
by: ritchie | last post by:
Hi, I am trying to clear the screen in my program. I am loking for something that will work on all compilers, especially Borland & MS Visual Studio 6. On Visual studio I used 'system("cls");'...
4
by: John | last post by:
Hi I have the following in a Perl script. I just want to "clear screen" but it does not work. I don't think I've got my client and server sides confused. Any ideas? <SCRIPT...
8
by: REDBAIT | last post by:
Hi Guys, Am using Windows 2000 and Dev C++ to create C programs. I'm trying to use clear screen and other graphic functions such as positioning output on screen. Have seen some documents that...
0
by: sajithamol | last post by:
I have an Applet that has three buttons on it, one being a clear screen button. I have it setup right now so it draws a rectangle the size of the applet and fills it with the background color. But...
2
by: owl | last post by:
and here I thought I was going to finally be able to change the world AND contribute back to python with my amazing clear screen extension - but I can't get it to work. ;( Copying from...
5
by: Kid Programmer | last post by:
Hello guys. I was wondering how you can clear the screen in a java program. Here is the code for my program: import javax.swing.SwingUtilities; import javax.swing.JFrame; import...
1
by: sganeshsvk | last post by:
i want to clear the screen command prompt for mysql in windows XP... In linux we use (CTRL + L) for clear the screen in mysql prompt.... i already use this command ( \c ) then ( \! clear ) for...
3
by: aravind12345 | last post by:
I have made a Calculator and i need to add a Clear button but i don't know how to clear the screen in the program can someone tell me how i will be thank full. i have no errors or warnings. This...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.