Results 1 to 4 of 4

Thread: functioning of getch()

  1. #1
    Join Date
    Nov 2009
    Posts
    53

    functioning of getch()

    Hi,

    I have gone through he standard C program format. And It seems that each program must contain the getch() function. I am not getting exact use of the getch() function.
    What will happens if program does't contains getch() function? If anybody know about the functioning of the getch() function then please let me know.

  2. #2
    Join Date
    May 2008
    Posts
    2,012

    Re: functioning of getch()

    Hi friends,

    Below are some information regarding the getch() function of the C programming:

    1. When we use getch() function in program, then while execution of program this function will waits to take inputs from the program user.
    2. "getch() function" gives control back to main() function of the program as soon as the user enters the any input for the program.
    3. The basic use of getch() in the programming is to display the number or character which is inputted by the user.

  3. #3
    Join Date
    Apr 2008
    Posts
    2,005

    Re: functioning of getch()

    Hi,

    For your information, the getch() function in the C language is hired from library files using header file known as "#include<conio.h>". I hope you are aware that the use of input while execution of the program is as screen stopper. And to achieve this task "getch()" get used. If you don't include the "getch() function" in program code, then you are not able to see the input for the program. The getch() function loose the control after the any character input.

    I hope this will help you understand the getch() function

  4. #4
    Join Date
    May 2008
    Posts
    2,297

    Re: functioning of getch()

    Hi,

    Please try to execute the following program which doesn't comprises the getch() function. Execute this below code and let's see what happens:

    void main()
    {

    clrscr();

    int a,b,c;

    printf("Enter two numbers");
    scanf("%d%d",&a,&b);

    c= a+b;
    printf("sum=%d", c);

    }

Similar Threads

  1. USB Drives not functioning.
    By vistadude in forum Hardware Peripherals
    Replies: 1
    Last Post: 03-03-2012, 11:21 AM
  2. RAM not functioning properly
    By WinsomeK in forum Motherboard Processor & RAM
    Replies: 3
    Last Post: 23-09-2011, 08:05 PM
  3. Facebook not functioning with ie9
    By Cappuccino in forum Technology & Internet
    Replies: 4
    Last Post: 15-03-2011, 03:30 AM
  4. Any way to confirm ECC functioning
    By Cherokee in forum Motherboard Processor & RAM
    Replies: 6
    Last Post: 05-09-2010, 05:54 AM
  5. CD Eject Key Not functioning
    By Jannat in forum Hardware Peripherals
    Replies: 3
    Last Post: 29-07-2009, 09:30 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,575,752.18351 seconds with 16 queries