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