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:
- can we define same functions for the two or more different...
- why we use inline function if there are simple function...
- how we used the 1-calloc Function 2- malloc Function 3-...
- Linklist Data Structure
- How to Deal With Errors in C Programming ? 2011-12
- # include main() { cout<< "How are u? welcome to my...
- how stack operation proves costly during traversing a tree
- constructor and destructor in c++ 2011
- Use of Inline Function in c++ 2011
- What is difference among main() int main() void...
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)