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:
- Boolean data problem in c++ 2011-12
- vector index problem in c++ 2011
- call by value, call by reference,call by pointer in data...
- what is Recursive function in c++ June 2011
- Different syntax? in c++ 2011-12
- What are the function of IO ports in C++
- what is function overloading and memory leak ?
- what is the value of cardinality(*) in association in c++ ?
- i take input from getchar(); function in program in C++ 2012
- cs201 intro to computer
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)