fork(1) download
  1. #include <stdio.h>
  2.  
  3. void imprime (char *v, int n) {
  4. char *c;
  5. for (c = v; c < v + n; c++)
  6. printf ("%c", *c);
  7. }
  8.  
  9. int main() {
  10. char texto[] = "teste de texto";
  11. imprime(texto, 5);
  12. }
  13.  
Success #stdin #stdout 0s 2168KB
stdin
Standard input is empty
stdout
teste