fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(){
  5. char *ponteiro = malloc(100);
  6. printf("String: ");
  7. scanf("%99s", ponteiro);
  8. free(ponteiro);
  9. }
  10.  
  11. //https://pt.stackoverflow.com/q/45796/101
Success #stdin #stdout 0s 9424KB
stdin
teste
stdout
String: