C getchar()
#include <stdio.h> int main() { int size = 5; char str[size]; int now = 0; char ch; printf("Enter whatever you want: "); while ((ch = getchar()) != ' ') { if (now == size-1) { while ((ch = getchar()) != ' ') { continue; } break; } else { str[now++] = ch; } } str[now] = '