create your own

Explaining :- clrscr (); and getch(); in C

74
rate or flag this page

By priyankmaniar


clrscr (); and getch();

clrscr(); and getch(); requires the header file conio.h i.e #include <conio.h>

clrscr();  :- This is use to clear the output screen i.e console

suppose you run a program and then alter it and run it again you may find that the previous output is still stucked there itself, at this time clrscr(); would clean the previous screen.

One more thing to remember always use clrscr(); after the declaration like

int a,b,c;

float total;

clrscr();

getch(); :- getch is used to hold the screen in simple language, if u dont write this the screen

will just flash and go away....

Print   —   Rate it:  up  down  flag this hub

Comments

RSS for comments on this Hub

priyankmaniar profile image

priyankmaniar  says:
8 months ago

i hope it helps. . !

nicomp profile image

nicomp  says:
7 months ago

Good explanation; also note that conio.h is not ANSI or ISO standard.

alam  says:
4 months ago

thanks brother i was forget it.

priyankmaniar profile image

priyankmaniar  says:
3 months ago

:)

REAl  says:
4 weeks ago

Thanks man.

Submit a Comment

Members and Guests

Sign in or sign up and post using a hubpages account.


optional


  • No HTML is allowed in comments, but URLs will be hyperlinked
  • Comments are not for promoting your hubs or other sites

working