Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

67
Views
Tome el texto ingresado en la consola después de ejecutar un programa en C

No estoy seguro exactamente si el título lo dejó claro, pero quiero guardar el texto escrito en la misma línea mientras ejecuto un programa en C.

Por ejemplo, si escribo: ./myprogram samplestring

Quiero guardar la cadena de muestra como una variable en el programa C. No estoy seguro de si esto es posible o no, y lo siento si no estoy siendo claro, estoy un poco confundido.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Desde aquí :

 #include <stdio.h> int main (int argc, char *argv[]) { int count; printf ("This program was called with \"%s\".\n",argv[0]); if (argc > 1) { for (count = 1; count < argc; count++) { printf("argv[%d] = %s\n", count, argv[count]); } } else { printf("The command had no other arguments.\n"); } return 0; }
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!