In 13th line of code,why we use cin.get() function.And what is the difference between cin.get() with parameters and without parameters
How cin.get() funciton will works
hello @kireeti_kesani cin.get() with parameters is used to take the input upto desired length like :
char name[25];
cin.get(name, 25);
cout << name;
input: Geeks for Geeks
output: Geeks for Geeks
second example:
char
name[100];
cin.get(name, 3);
cout << name
input: GFG
Output: GF
if you still have any doubt you can ask here .
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.