1

Is this possible to get the cmd output as input in C using system()?. I want to read the output of the cmd as input.

For Ex. The command in system("echo %username%"); will result the current logged user name as output like Prasanthvel. I just want to read the output and store in a string to do some program.

Note : I don't want to save it into a text file, and this question is different from other questions in this forum or the answers were not sufficient to do this.

Prasanthvel
  • 27
  • 2
  • 15

0 Answers0