fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3. #define TAM 3
  4.  
  5. int main(){
  6. char str[TAM + 1];
  7. char letra;
  8. scanf("%c", &letra);
  9. memset(str, letra, TAM);
  10. str[TAM] = '\0';
  11. printf("%s", str);
  12. }
  13.  
Success #stdin #stdout 0s 4488KB
stdin
p
stdout
ppp