Wednesday, 4 September 2013

Introdution to delay getch clrscr

c and c++ tutorials // online learning spot
Till now we saw how to print some thing and how to format that thing, but now we will see some more monitor based functions that will add some pleasure to your program learning.
In this chapter we will learn about :
  • getch()
  • clrscr()
  • delay
and learn to use them.
First we discuss about their header files:
  • conio.h (console input output) : getch,clrscr
  • dos.h : delay
so whenever we use any of these functions we have to include their header files in our program before their use.

Description of functions :

-->getch() : It waits for an input from input console (Keyboard) and the converts it in ASCII code.
                 we can either save that code or can leave it. Generally it is better used to hold program at a point from further execution till a key is not pressed. Full Form : GET CHARACTER

-->clrscr() : It clears the screen and reset cursor to initial position (top left corner). 

-->delay() : It stops the execution of program for a given time interval (in milliseconds)

In next chapter we will see their use through programs


<<Back        Next>>




No comments:

Post a Comment