Question: Hello. This is in C Edit the program which will run with the following command line a.out ??????x???? where the second command line argument starts

Hello. This is in C

Edit the program which will run with the following command line

a.out ??????x????

where the second command line argument starts with some unknown number of digits (0-9) followed by the lowercase letter x and then another unknown number of digits (0-9). Your program should identify the two integer values before and after letter x, and print them out on the screen using printf(...... %d, ...)

#include

#include

int main(int argc, char *argv[])

{ int n, m; // dimension of the game board

char s[10]; // before they learn DMA

int i=0, j=0;

if (argc != 2)

{ printf("a.out ???x?????? ");

exit(0);

}

// add your code here to determine the values of n and m

printf("n = %d m = %d ", n, m);

return 0;

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!