+ 1
Can I use the getchar(); with int, float, double?
#include<studio.h> Into main() { int a = getint (); } Like this
6 odpowiedzi
+ 5
The function name explicitly describes the usage, get a character. Did you try, how did it go? because I think it wouldn't work as expected.
P.S. Remove any word from thread tags except for 'getchar' please. No codes should be written into tags.
+ 4
It's okay I understand,
Welcome and please check out this tips for getting good posts and answers 👍
https://www.sololearn.com/Discuss/333866/?ref=app
+ 3
No.
scanf() with %d and %f for int and float
Third lesson in this module:
https://www.sololearn.com/learn/C/2914/
+ 3
No you can't use getchar() for int , float, double as it takes single character as input.
+ 2
Sorry I'm I new user
Thanks to worn me
+ 1
Yes it gave an error
But thought that it must have any other function to get the value of int, float, double