Is there any way to check whether a character is equal to white space ?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Is there any way to check whether a character is equal to white space ??

tried isspace even [I]==' ' din work

28th Nov 2017, 9:33 AM
blacksheep
blacksheep - avatar
19 Answers
+ 1
it's space key has ascii value 32
28th Nov 2017, 9:36 AM
Gokul Krishna
Gokul Krishna - avatar
+ 1
ty man @Deepak
28th Nov 2017, 11:14 AM
blacksheep
blacksheep - avatar
+ 1
yeah man
28th Nov 2017, 11:22 AM
blacksheep
blacksheep - avatar
+ 1
codeblocks
28th Nov 2017, 11:25 AM
Gokul Krishna
Gokul Krishna - avatar
+ 1
is it good??
28th Nov 2017, 11:25 AM
blacksheep
blacksheep - avatar
0
try getchar()
28th Nov 2017, 9:38 AM
Gokul Krishna
Gokul Krishna - avatar
0
std::getline(std::cin,a); strcpy(c,a.c_str()); for(I=0;I<10;I++) { if(ispace(a[I]) {cout<<"its white";}}
28th Nov 2017, 10:05 AM
blacksheep
blacksheep - avatar
0
such that all the variables are declared
28th Nov 2017, 10:05 AM
blacksheep
blacksheep - avatar
0
both not working
28th Nov 2017, 10:17 AM
blacksheep
blacksheep - avatar
0
no isspace needs a character as an argument
28th Nov 2017, 10:18 AM
blacksheep
blacksheep - avatar
0
the code above is it
28th Nov 2017, 10:29 AM
blacksheep
blacksheep - avatar
0
I got it right the problem was with that I was using cin in my program
28th Nov 2017, 11:16 AM
blacksheep
blacksheep - avatar
0
sorry I couldn't as I was writing the code but by mistake I killed the app so got frustrated to type again
28th Nov 2017, 11:21 AM
blacksheep
blacksheep - avatar
0
thanks btw@immortal
28th Nov 2017, 11:21 AM
blacksheep
blacksheep - avatar
0
yeah the code was right but I had made a small mistake
28th Nov 2017, 11:22 AM
blacksheep
blacksheep - avatar
0
btw which ide do u people use??
28th Nov 2017, 11:24 AM
blacksheep
blacksheep - avatar
0
recommend me one
28th Nov 2017, 11:26 AM
blacksheep
blacksheep - avatar
0
I thought of using eclpise
28th Nov 2017, 11:27 AM
blacksheep
blacksheep - avatar
0
is netbeans good for jse and jee?
28th Nov 2017, 11:32 AM
Gokul Krishna
Gokul Krishna - avatar