Thursday, June 27, 2013

Use of Clrscr and getch functions

In all our program we use the clrscr() and getch() function irrespective of what program it is ,if you don’t use it in your program you didn’t get any error, it  has some effect on the output display not on the out
clrscr :
clrscr means clear screen, i will clear the output of the previous program(s) . below fig, show the effect of clrscr on the output when it is not used
image
from the above image we can see that current program output is displayed along with previous output.
getch:
getch means get character, this command hold the output screen till the user press any key, without this command user cannot see the output after running the program(ctrl+F9), (can see by pressing alt+F5,after running the program). see the below video

Like the Post? Do share with your Friends.

2 comments:

  1. thankyou sooo much for clearing the purpose of clscr and getch .. i wasnt getting any output...i didnt find this knowledge in any other website

    ReplyDelete