Why TAB with ASCII value 9 is non printable character and SPACE with ASCII value 32 is printable?I can open any editor and press any of them and I see it on screen(If I press tab cursor is moved by tab, and space if I press space)
Then why one of them is printable and other non printable?
Are you referring to std::isprint? Well, I'm not sure but I guess tab is more of a control character because it doesn't behave as a normal character. Space does have a fixed predictable width and behaves exactly like all the other "printable" characters.
tab is a control character. It sends commant to terminal to change caret position. It behavior can change depending on terminal (8 or 4 tab stop, should it overwrite characters it "jumps over" or shoud it keep it)
Space is a character like 'a'. Means it always uses one space (and advances caret one position) and some fonts moght even have a glyph associated with it.