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:
- convert template to int in c++
- what is difference between friend class and friend alternate
- cascading operator overloading in c++ 2011
- What is difference among main() int main() void...
- What is Aggregation in OOP?
- Why Encpsultion is used in OOP?
- C++ Random crash 2011
- sir i m having linker and build error. pls help out. regards
- Memory pool & char array questions in C++ for 2011
- Define Explicit and implicit in 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)