Answer the question
In order to leave comments, you need to log in
How to pass text through the command line in C?
Good afternoon, I came across a task in which you need to transfer text via the command line (I know that this is related to argc argv), please help me out !!!
Answer the question
In order to leave comments, you need to log in
https://en.cppreference.com/w/c/language/main_function
#include<stdio.h>
int main(int argc, char* argv[])
{
if(argc > 0)
{
for(int i = 0; i != argc; ++i)
printf("%s\n", argv[i]);
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question