Assuming the executable file name of run and the following w

Assuming the executable file name of run and the following were typed at the command prompt: ./run This file input.txt is only a test what output is produced by the following program: #include void curious (int, char**); int main (int n, char**a) {curious (n, a); return o;} void curious (int n, char**p) {int i=n; do {printf (\"%5d: %s\ \", n-i, *p++);} while (--i);}

Solution

Output:

0: ./main                                                                                                                                                                   

    1: This                                                                                                                                                                     

    2: file                                                                                                                                                                     

    3: input.txt                                                                                                                                                                

    4: is                                                                                                                                                                       

    5: only                                                                                                                                                                     

    6: a                                                                                                                                                                        

    7: test   

Explanation:It will print the whole sentence word by word.

Note:Please do ask in case of any doubt,Thanks.

 Assuming the executable file name of run and the following were typed at the command prompt: ./run This file input.txt is only a test what output is produced b

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site