what is the use of getch() function in C program..
difference b/w getch() and getche()??
Answers were Sorted based on User's Feedback
Answer / divyansh and ankur
as in the case of getch(),whn user rturn to the program after hitting the key that charctr will be erad n get stored as comapred with getch () the compiler will not store the value
,as by pressing alt+f5 in case getche ()
u wil notice tht scren will show the charctr that u pressed to go back o the progrm as it willl not show tht chrctr in simple getch()..thank u buddy
| Is This Answer Correct ? | 4 Yes | 1 No |
Answer / sachin alawadhi
getch() function used to freeze the output screen after
the result and when the any key entered and return an ASCII
value of that character. But don't show what character was
entered by the user.
whereas getche() function shows ASCII value as well as
entered charachter.
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / piyush srivastava
getch() function works to get character from the user,but it
is used to hold the output,it may have the alternatives but
it the easiest way to perform this action.
getch() only read the character from the user but getche
also display it on the output screen .
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / pravin
getch() is the function which only reserv our time and it
is portable to see the direct output without going into the
another menu. it gives us echoing. in simple wayit is the
shortcut for the output userscreen.
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / ambili
getch() is the function to see the out put console...thats true.
But is there any other reason for why we use getch()...is it
used for accepting characters?
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / satnam
getch() is used in making the programme of password. by the help of getch() function whatever password is inputted by user is not displayed on a screen.
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / venkatesh kr
getch() is use in c langauge for hold the screen.
| Is This Answer Correct ? | 5 Yes | 4 No |
Answer / yashwant/9015785079
When you will run program, the program will exit only when you press a character, note that we are talking about a character.
so try pressing numlock, shift key etc (program will not exit if you press these keys) as these are not characters. Also try the program by removing getch(),in this case program will exit without waiting for a character being pressed from keyboard.
Common use of getch is that you can view the output (if any) of your program without having to open the output window if you are using turbo c compiler or if you are not running your program from command prompt.
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / karan kakade
it helps to keep the o/p screen stabel, or else the o/p
screen would blink n will go to notepad where we write
prog....
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / mamatha
getch() is used for when we give the input that should be
hidden.
| Is This Answer Correct ? | 1 Yes | 0 No |
Explain this code. #include <stdio.h> void f1(int *k) { *k = *k + 10; } main ( ){ int i; i = 0; printf (" The value of i before call %d \n", i); f1 (&i); printf (" The value of i after call %d \n", i); }
Question 1: You want to conduct a survey within your classroom, on the quality of canteen’s food. You ask each of your class fellows to rank the quality of food between 1 and 5 (1 representing excellent quality and 5 representing worst quality). During the survey, you make a list containing the roll# of student and the opinion given by that student. The list can be as follow Roll # Opinion 234 1 235 1 236 5 237 1 238 2 239 3 240 5 241 5 242 1 To get the results of the survey, you need to determine the frequency of each opinion value. The frequency of an opinion is determined by counting the number of students giving that opinion. For example, for the above list the frequency of opinion value 1 is 4 and frequency of opinion value 4 is 0. After getting the frequency of each opinion, you can easily judge about the quality of the food by seeing through the frequency of each opinion. You need to develop a program to calculate the results of this survey. The program inputs the opinion of 50 students and counts the frequency of each opinion. It then displays a report showing the frequency of each opinion. Sample output: Opinion Frequency Remarks 1 5 Excellent 2 10 Good 3 15 Normal 4 10 Bad 5 10 Really bad
write an interactive C program that will encode or decode a line of text.To encode a line of text,proceed as follows. 1.convert each character,including blank spaces,to its ASCII equivalent. 2.Generate a positive random integer.add this integer to the ASCII equivalent of each character.The same random integer will be used for the entire line of text. 3.Suppose that N1 represents the lowest permissible value in the ASCII code,and N2 represents the highest permissible value.If the number obtained in step 2 above(i.e.,the original ASCII equivalent plus the random integer)exceeds N2,then subtract the largest possible multiple of N2 from this number,and add the remainder to N1.Hence the encoded number will always fall between N1 and N2,and will therefore always represent some ASCII character. 4.Dislay the characters that correspond to the encoded ASCII values. The procedure is reversed when decoding a line of text.Be certain,however,that the same random number is used in decodingas was used in encoding.
Write a program to find factorial of a number using recursive function.
Why do we use null pointer?
Explain what is the best way to comment out a section of code that contains comments?
Is calloc better than malloc?
what is calloc and malloc?
What is putchar() function?
implement general tree using link list
How do we print only part of a string in c?
1)which of following operator can't be overloaded. a)== b)++ c)?! d)<=