fork download
  1. #include <stdlib.h>
  2. #include <stdio.h>
  3. #define MAX 100
  4.  
  5. int main()
  6. {
  7. char tab[MAX];
  8. int count=0;
  9. char s;
  10. while((s = getchar()) && s != '\n'){
  11. tab[count] = s;
  12. count++;
  13. }
  14. for(int i=0; i<count; i++){
  15. printf("tab[%d]=%c\n", i, tab[i]);
  16. }
  17. //wyswietl(tab);
  18. return 0;
  19.  
  20. }
Success #stdin #stdout 0s 2252KB
stdin
Ala ma kota
stdout
tab[0]=A
tab[1]=l
tab[2]=a
tab[3]= 
tab[4]=m
tab[5]=a
tab[6]= 
tab[7]=k
tab[8]=o
tab[9]=t
tab[10]=a