getchar() function takes a single character as input from user. You can store the character into a character variable or an array. For example if you have a character variableView more random threads:
- A simple pthread program runtime error in c++ 2011
- What is namespace std in c++ 2011?
- What is difference among main() int main() void...
- Initilization of Data Member in c++ 2011
- library dos.h in c++ 2011
- c++ program on unix
- c++ code 2011
- const. pointer or pointer to const. char
- c++ linux ubuntu 10.04 help with GUI in c++ 2011
- array project code c++ 2011
char s;
then s = getchar(); statement will take one character from the user and store it in s.
Similarly you can get input in a character array using a loop where each iteration of loop will store one character in array's elements.
Sponsored Links
There are currently 1 users browsing this thread. (0 members and 1 guests)