answersLogoWhite

0


Best Answer

explain about function call

User Avatar

Wiki User

9y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you accept a string by using getch() function with an example?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Why getch function has semicolen?

Without the semi-colon, getch is just an expression, not a statement.


C programming to convert upper case string into lower case string and vice versa without using builtin function?

#include<stdio.h> #include<conio.h> void main() { char ch; clrscr(); printf("Enter a Character"); scanf("%c",&ch); if(ch>=65 && ch<=90) ch=ch+32; printf("Upper Case =%c",ch); getch(); }


What function enables the user to input information while the program is being executed in c?

The scanf() function is a commonly used function to input information during the execution of a program. scanf() function has its prototype in the stdio.h header file. To accept and display a number: int num; printf("Enter a number: "); scanf("%d",&num); printf("You entered %d",num); To accept and display a character, replace %d with %c and make num a character variable [char]. Plus: gets, fgets, read, fread, getchar, getc, fgetc, getch...


Why getch is used at the end of every c program?

getch() takes one char from keyboard but it will be invisible to us. in other words we can say that it waits until press any key from keyboard.getch() is a function which has its protype defined in conio.h header file.it is basically used to take input a single characterfrom keyboard. and this char is not displayed at the screen.it waits until itn gets a input that's why it can be used as a screen stopper.


C prog to concatenate two string without using buid in function?

//String Concatination#include#includeusing namespace std;char* strcat(char*,char*);int main(){char str1[100];char str2[100];coutstr1;coutstr2;cout

Related questions

What will you use if getch is only for char how about if int?

Function scanf for example. Or, for advanced users: fgets+sscanf


Why getch function has semicolen?

Without the semi-colon, getch is just an expression, not a statement.


Is there a C language programming statement that allows you to input and accept a keypress WHILE a loop is running?

You will need to read a single characther in the loop with something like a getch and save the characther wherever you want it. That way you can process the resultant string any way you want while you're in the loop and still maintain control to make decisions based on the input. You are probably looking for the function kbhit(), which tests whether a character is available before you call getch(). Calling getch() directly waits until the character is available. If kbhit() returns true, the next getch() will not need to wait. char key = '\0'; while (key!='x') { if ( kbhit() ) key=getch(); /* do other actions */ }


What is the function key that is used to display the result in the output screen?

getch();


What use getch function in c language?

Gets one character (or keystroke) without buffering or echoing; beware: getch is not part of the standard library.


What is the function of getche in programming c?

Function getche is Borland-specific function declared in conio.h, it does the some thing as getch, but echoes the character on the screen.


What is the use of getch in C programming?

We use getch() function to hold the screen so that we can see the output but in real it is use to take a input of a character from the console window. Read this out -


Why getch function are used?

Getting a character. Whenever you have a question regarding a function, you may use your system's help/manual system.


How do you display a text reversely in C language without using onlu simply input and output?

#include<stdio.h> #include<conio.h> void main() { char string[20]; int i=0; printf("Enter the string.\n"); while(i<=19) { scanf("%c",&string[i]); i++; } while(i>=0) { printf("%c",string[i]); i--; } getch(); } In this program it is compulsory to enter 20 characters. Now we can write a program in which it is not necessary. #include<stdio.h> #include<conio.h> #include<string.h> void main() { char string[20]; int length; printf("enter the string.\n"); gets(string); length=strlen(string); length--; while(length>0) { printf("%c",string[length]); length--; } getch(); }


Can you write a c program to copy one string to another without using library function?

#include<stdio.h> void main() { int str[20],str1[20],i,j=1; printf("enter the string"); gets(str); for(i=1;str[i]!='\0';i++) { str1[j]=str[i]; j++; } if(str1[j]!='\0') { puts(str1); } getch(); }


Wapto input two strings and then combine it into one string?

#include#include#includevoid main(){char a[20],b[20];clrscr();printf("Enter String a: ");gets(a);printf("Enter String b :");gets(b);printf("%s",strcat(a,b));getch();}


C programming to convert upper case string into lower case string and vice versa without using builtin function?

#include<stdio.h> #include<conio.h> void main() { char ch; clrscr(); printf("Enter a Character"); scanf("%c",&ch); if(ch>=65 && ch<=90) ch=ch+32; printf("Upper Case =%c",ch); getch(); }