Hello, I'm trying to make a very basic cmd, but I'm having problems ...
My code:
#include <stdio.h>
int main()
{
char arg[300];
scanf("print '%s'", arg);
printf("%s", arg);
fgetc(stdin);
fgetc(stdin);
return 0;
}
So I went to test:
entrada: print 'hello world'
saída: hello //não coloca o que eu queria
But what I wanted was:
entrada: print 'hello world'
saída: hello world
Can anyone explain what's going on?