fork download
  1. #include <stdio.h>
  2.  
  3.  
  4. int main(void)
  5. {
  6. int a, b, n, s = 0;
  7. char str[50][51];
  8.  
  9. scanf("%d", &n);
  10. printf("Check value. n[%d]\n", n);
  11.  
  12. for(a = 0; a < n; a++) {
  13. scanf("%s", str[a]);
  14. }
  15.  
  16. while(str[0][s] != ' ') {
  17. s++;
  18. }
  19.  
  20. for (a = 0; a < n; a++) {
  21. for (b = 0; b < s; b++) {
  22. if (str[a][b] != str[a+1][b]) {
  23. str[a+1][b] = '?';
  24. }
  25. }
  26.  
  27. }
  28.  
  29. printf("%s", str[n - 1]);
  30.  
  31. return 0;
  32. }
  33.  
Success #stdin #stdout 0s 2116KB
stdin
Standard input is empty
stdout
Check value. n[0]
�