I am trying to be able to read in 1 000 1 1 1 as like 100011. Also when I do printf of the string program crashes. Here is my code
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#define MAX 32
int main(void){
int i;
int c;
char a[MAX];
char b[MAX];
printf("input a: ");
scanf("%c", &a);
while (a[i]) {
c = a[i];
if (isspace(c)) c = a[i+1];
i++;
}
printf("%s", c);
getch();
}