fork(1) download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main(void) {
  5. char nomeString[] = "nomedoarquivo.txt";
  6. nomeString[strlen(nomeString) - 4] = '\0';
  7. printf("%s", nomeString);
  8. }
  9.  
Success #stdin #stdout 0s 2160KB
stdin
Standard input is empty
stdout
nomedoarquivo