fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4.  
  5. int main() {
  6. char ent[3] = {'E','0'};
  7. char saida[10];
  8. int n=5;
  9.  
  10. for (int i = 0; i < n; i++) {
  11. sprintf(saida, "%s%01d", ent, i);
  12. printf("novo ent: %s \n ",saida);
  13. }
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 9424KB
stdin
Standard input is empty
stdout
novo ent: E00 
 novo ent: E01 
 novo ent: E02 
 novo ent: E03 
 novo ent: E04