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:
- int x[10]; x[0]= 1; x[1]=2; if following code is executable...
- Sir please clear i++ and i-- terms.What is there function
- object oriented programming what does it mean and what are...
- the source file is not compile in c++
- C++ Crabs 2011
- can we define objects without any class?
- Visual C++ on pen drive 2011
- How to Write a function factorial in C++ and java and php...
- what is meant by concrete class in c++ 2011?
- C++ have Virtual Function vs Function Pointer call 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)