:: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Categories >> Software >> Programming Languages >> C


 C interview questions  C Interview Questions (2254)
 C++ interview questions  C++ Interview Questions (1111)
 VC++ interview questions  VC++ Interview Questions (342)
 Delphi interview questions  Delphi Interview Questions (510)
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions (646)
what is the use of getch() function in C program..
difference b/w getch() and getche()??
 Question Submitted By :: C
I also faced this Question!!     Answer Posted By  
# 1
getch() is for waiting the o/p screen til we enter the inputs 
Is This Answer Correct ?    258 Yes 63 No
# 2
getch() waits for the user to input a character and
displays the output till the user enters a character.As
soon as the user enters a character it transfers the
control back to the main function, without displaying what
character was entered.
getche() does the same thin but it displays the chacter e stands for echo.
Is This Answer Correct ?    177 Yes 21 No
# 3
getch() returns to the program after hitting any key.
getche() waits for the character, read it and then returns
to the program
Is This Answer Correct ?    95 Yes 30 No
# 4
getch() is used to wait the execution of program on console
unless program will skeep the output witout showing on
console of program in short it all time to user to see
output during the run time of program
Is This Answer Correct ?    34 Yes 15 No
Sachin Banaya
# 5
getch() is used to read the character,
but getche()is used to read and display character on output.
Is This Answer Correct ?    46 Yes 30 No
# 6
# 3 getch() returns to the program after hitting any key.
getche() waits for the character, read it and then returns
to the program
Is This Answer Correct ?    20 Yes 13 No
Sudhir Tiwari
# 7
getch() helps in holding the console screen and helps in reading the codes properly 
Is This Answer Correct ?    12 Yes 5 No
# 8
getch() and getche()
both are getting input charecter to user
but getche() display the that charecter to screen
Is This Answer Correct ?    8 Yes 3 No
# 9
Both getch() and getche() are used to read single character
there is very little difference
-getch() doesn't display output to screen if used without lvalue
-getche() display output to screen even if used without lvalue

following example will clear this.....
after running above programs...............
when you press any key, you'll exit from output screen
verify the output by pressing alt+F5
1. will not show anything
2.will show the key you were pressed......
hope you get it.............
Is This Answer Correct ?    6 Yes 1 No
# 10
Waiting the input for output screen.. 
Is This Answer Correct ?    5 Yes 1 No
Rajesh Kumar

Other C Interview Questions
  Question Asked @ Answers
find the size of structure without using the size of function Bosch 1
char ch="{'H','I',0};printf("%s",ch);what is output Accenture 9
how the compiler treats any volatile variable?Explain with example. Tata-Elxsi 1
Average of a couple 10 years ago was 25. The average remains same after having a child and twins after 3 years. What is the present age of the first child IBM 10
compare array with pointer?   1
How to set a variable in the environment list?   1
in one file global variable int i; is declared as static. In another file it is extern int i=100; Is this valid ? NetApp 1
please can some one guide me, to the answer Write a C program to enter 15 numbers as an input from the keyboard and program will find and print odd numbers and their average. i have studied while and do while loop for loop if and else if switch   2
#include<stdio.h> int f(int,int); int main() { printf("%d",f(20,1)); return 0; } int f(int n,int k) { if(n==0) return 0; else if(n%2)return f(n/2,2*k)+k; else return f(n/2,2*k)-k; } how this program is working and generating output as 9....?   1
write a program to gat the digt sum of a number (et. 15= >1+5=6)   2
Is it possible to create recycle bin in mobiles?   2
Study the Following Points: a.One Cannot Take the address of a Bit Field b.bit fields cannot be arrayed c.Bit-Fields are machine Dependant d.Bit-fields cannot be declared as static 1. Which of the Following Statements are true w.r.t Bit- Fields A)a,b&c B)Only a & b C)Only c D)All Accenture 3
For more C Interview Questions Click Here 

Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
Copyright 2013  All Rights Reserved.   ::