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:
- Passing into function array of matrix in c++ 2011
- c
- how we can store data into a file in C++ and java?
- protected inheritance and abstract classes in C++ 2012
- # include main() { cout<< "How are u? welcome to my...
- Creating File Associations in c++ 2011
- when user enter 6 number guessing game of tossing coin
- assalam o alaikum sir Is that neccessory to use a Function...
- What is namespace std in c++ 2011?
- i got the conecpt of string array as i asked before but i...
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)