Modify program so that input comes in as command linearguments.
Sample run:
./a.out W8 4 ME 2 finish 2!
Output:
Consonants: WMfnsh
1) Name your program command_consonants.c.
2) If no command line arguments was provided, your program shouldprint a usage message “Usage: ./a.out input
#include
int main()
{
printf(\"Input: \");
int i = 0;
char ch;
// array to store consonants
char consonant[100]={\"\"};
//do loop to take input
do
{
ch = getchar();
//checks to see if consonants or not
if(((ch >= 'a' && ch <= 'z')||(ch >= 'A'&& ch <= 'Z')) && !(ch == 'a' || ch == 'e' || ch== 'i'|| ch == '0' || ch == 'u' || ch == 'A' || ch =='E'|| ch=='I'|| ch =='O' || ch == 'U'))
{
consonant[i] = ch;
i++;
}
 ÂÂ
}
while(ch != '\n');
 ÂÂ
printf(\"Consonants:\");
printf(\"%s\", consonant);
 ÂÂ
return 0;
}