fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. static char *argv[] = { "app", "123", "456" }; //gambiarra pra simular a passagem de argumento pela linha de comando
  5.  
  6. int main(/*int argc, char *argv[] */) {
  7. printf("Soma: %ld", strtol(argv[1], NULL, 10) + strtol(argv[2], NULL, 10));
  8. }
  9.  
  10. //https://pt.stackoverflow.com/q/290587/101
Success #stdin #stdout 0s 4308KB
stdin
Standard input is empty
stdout
Soma: 579