0 like 0 dislike
11.2k views

Write a program that echoes its command-line arguments in reverse order. Running the program by typing

reverse void and null

should produce the following output:

null and void

Example 2:

reverse you are one number

should produce the following output:

number one are you
[Exercise] Coding (C) - asked in C
ID: 22972 - Available when: Unlimited - Due to: Unlimited
2 flags
edited by | 11.2k views
0 0
Called for Help
0 0
Called for Help
0 0
Called for Help

90 Answers

0 like 0 dislike
Hidden content!
#include ** ** * ****
* ** * ******** *
* * * * * *** *



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

{
**** **** * * * i;


* * * ** * * ** * **** *** * * ** * ** * i--)
* *** ** * ** ** ** * * **** ** **** ** * * ** * * * * * argv[i]);


* **** * *** * * * **** 0;

}
answered by (5.2k points)
0 like 0 dislike
Hidden content!
#include * **** * *****
** *** ***

#include ** * * ****



int main(int ** *str[])

{
* *** **** * **** * * *** i;


* * ** *** * * * * * ** ***** i--)
*** * * ******* ** *** * * * * ** * **** * * *** *** * * **** * str[i]);


** *** * ** ** *** ** 0;

}
answered by (5.2k points)
0 like 0 dislike
Hidden content!
#include ** * *** * ** *
* * ** *** *

#include * * *** ** **



int main(int * ** *str[])

{
* ** * *** ** * ** ** i;


* * * * * * * * * **** * i--)
* **** * * *** **** * **** ** * * *** **** * * ** *** **** str[i]);


**** *** * ** * * * ** ** 0;

}
answered by (5.2k points)
0 like 0 dislike
Hidden content!
#include <stdio.h>

#include <stdlib.h>

#include <string.h>



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

{
* **** * * * * ** * text[100000];
* ** * **** ** ** ******* **** i, j;
** ****** * *** * * *** * ** **** * text);


* * ** ** * * *** * *** *** end = strlen(text);


* * *** ********** **** ** * *** - 2; i>=7; i--)

    {
* * *** ** *** * * *** **** * ***** == ' ')
** *** ** * * * ***** * * * * * * * ** **** *
*** *** ** * ** * * * ** * * ** **** * * * * * *** ** * ** * * j<end; j++)
*** * ****** * ** * * ** * * ** * ***** * * * *** ** ** * *** * ** *** * * * ** * * ****** * * text[j]);
** * * ** **** * ** ********* * ******* * * * *** * *** * * != 7)
* *** * **** * ** * ** ** * ***** * * ** ** * **** *** ** **** **** * ** * ** * ");
** * **** **** * * *** *** * * ****** ** * * * * * * *** ** ** * * = i;
** ** ** ** * ***** *** *** * * ** *
*** ** ** ** * ** * *** *


* * *** ** ** **** ** 0;

}
answered by (5.2k points)
0 like 0 dislike
Hidden content!
#include <stdio.h>

#include <stdlib.h>

#include <string.h>



int main()

{
* * *** * **** ** * * * text[100000];
* ** **** *** ** ** **** ** i, j;
** * ** ** ** ** ** **** * *** text);


* ** *** ** ** end = strlen(text);


** ** ***** * ** ** * * * * * - 2; i>=7; i--)
* *** ** **** * *
* *** ** ********* ** * * * ** *** ***** == ' ')
** * * **** * ** * ** ** * * * * * ****
****** ** * ** * ** * * ******* * ****** ** **** * ** ***** * * * * ** j<end; j++)
* * * * ** ***** ** ** * * ********* * ** * *** ** * * *** * ** * * * **** * ** * *** ***** * text[j]);
** *** ** ** * * * ** *** * ** * * *** * ** * * * * *** * * * * *** != 7)
* * ** * * *** * ** ******* * * * * * * * * * * * ** *** * * *** *** **** ** ** * ** ** * * ");
* * *** * ** *** ** ****** ****** * * ** * *** ** * *** * = i;
**** *** * *** ** * *** ** ** * *** * *** ** *

    }


** *** ** * * 0;

}
answered by (5.2k points)
0 like 0 dislike
Hidden content!
#include <stdio.h>

#include <stdlib.h>

#include <string.h>



int main()

{
** * * ** * ** ***** * ** * *** text[100000];
**** ****** *** * * i, j;
** * ** ** * ** ** *** ** **** ** * *** text);


* *** ** * *** * * end = strlen(text);


* * * * * *** *** *** ***** - 2; i>=7; i--)
* * * *** **** **
*** * ****** ** * ***** * *** **** * ** * *** ** == ' ')
**** ** ** ** *** ** ** ** * ** * *** * **
* * ** ***** * *** * * ** ** ** ** **** ***** * *** ** * j<end; j++)
** ** * ** * * ** *** *** * * **** ***** ** ** * ** * * * **** ** ** * *** * ***** text[j]);
**** ** * * ** ** * * * ******** ** ** ** * * ** ** *** ***** **** * ** ");
** ** ** ** *** ** * **** * * * * ** * ** ** ** * * * * = i;
** ** *** * ** * * * ** ** *** *
** * ***** * * ***** * **


*** ** * * * * * ** *** 0;

}
answered by (5.2k points)
0 like 0 dislike
Hidden content!
***** * **** * *
* *** ** ***

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

{
*** * *** * **** *** i;
*** * ** ** ** * * * ** ** ****
*** * * * * ****** * ** * * *
****** * * ** *** * ** * * **** ** * **** ** * * ** ",argv[i]);
** ** ** * *



}
answered by (-324 points)
0 like 0 dislike
Hidden content!
#include <stdio.h>

#include <stdlib.h>

#include <string.h>

int main()

{

    char rev[10]="", inputarr[50]="",comparr[10]="reverse";

    int i;
*** * ** * *** * * * * * * * * **** **

    if(strcmp(rev,comparr)==0)

    {


* *** *** * ** *** * * ** *** *** ** ** *
* * * ** * * * ** *** * **** ** * *** * ** l,k,m;
** * *** *** * * * *** * **** * * * *** * * **** * *
* ** *** * * *** **** * * * * ** * ** (i=l-1;i>=0;i--)

        {
* * *** * *** ** * ** * * * * **** * ** * * * *** * *** * ** * *** ** * ')
*** * * ****** * ** ** * * * * ** * * *** * *** ** ** ** * * *
*** *** * * *** * * * * * *** * ******** * * * * *** * ** ** * ** * *** * *** * * * * * ** ** ** * **
**** * * * **** ** * * *** * ** * *** * ** ** * * * ** ** * * * * *
* * ** * *** * * * * *** * * ** ** ** * * ** **** **** ** * * * ***** ** *** * **** * **** * ***** * ** ** ** * ** *
* * ***** * *** ** ** * ** *** * ** * * *** ** * *** * * * ** ** * *** *** ** *** ***
** *** ** ** ** **** ** **** ** ** * ** * ****** ** * ***** * * * **** * * *** ** ** ** * * * *** ");
* ***** * * * ******* * ** *** ** ** * * * * ** * * ** *** * * * * *** ** ******* * * **
** *** * * * * *** *** ** *** ** ** ** * **** ** * * * * * ** *
* ** ** ** * ** ** * * ** ***** * ** ** * *** * *** * * **
* * * * *** ** ***** * **** *** ** * * * * ***** ** *** *
*** ** * ** * *** **** * * ** *** **** ** * * * * ** * * ** * * * ** * ***** * * * * **** *
** ****** * * *** **** * * ***** * ****** ** * * ** * * ** * * ** * * * ** *** * * ** ** * ** ** * *** * ** *
** ** * * ** * * * * ** * **** * * * * * **** ** *
* * *** ** * * * *** * ** *** * **
** ***** * * ****** * * ** * ** *** * * ** * ** ** *

    }

    return 0;

}
answered by (-136 points)
0 like 0 dislike
Hidden content!
#include <stdio.h>

#include <stdlib.h>

#include <string.h>

int main()

{

    char rev[10]="", inputarr[50]="",comparr[10]="reverse";

    int i;
** ***** ** * * ** * * ** * ** * *** * * *

    if(strcmp(rev,comparr)==0)

    {


* ***** * * *** *** ***** *** * ** ** **** **
* * * * ** ** * * *** * *** ** *** ** ** * * * * l,k,m;
** * *** * ***** * ** **** ** * ******* ** * *
** ****** **** *** **** * * ******** *** (i=l-1;i>=0;i--)

        {
* * * * **** * ** * * ** * ** * *** ****** ** *** ***** * * * * ** ')
** *** * * * * **** ** *** * **** *** ** * * * * ** ** *
* * ** * * * * * * * ** * * *** **** * * ** *** * ***** ** ** * ** *** * * *** ** * ** * **
** * *** * ** * ** * * * ****** ** * *** * * ** * ** * ****** *** ** * ** ** * * * **
* * **** * ** * * *** * * ** * * ** * ** ** * * *** **** * **** ******* ** * ** ***** * *** *** * ** *** *** ** *** ** ***** * *
* * **** * ** * ** * * * ** * ** ** ** ** * * ** * * * * * * ** * * *** * * **** * * * *
** ** ***** *** * * *** * * * ** ** * ** * * * ** * ** * * * * ***** * * * * **** ** * * ");
* *********** ** * * * * * * ** ** * ** * ** * * * ** *** *** * * ** ******
****** * * * * *** ** ** * * *** **** ** * ******* **
* * *** *** * * ** * ** ** * * ** ***** ** ** *** * * ** *** * *
* * * ***** *** * * * * * * *** * ** *** * * ******* * *
* ** *** *** * *** ** *** *** * ** * * ****** * *** * * *** * * *** ** * ** * ***
* ** ***** ** * ** ** * ** *** * ** * ** ** * ********* * ** *** * ** ** * ****** *** * ** * * ***** ***
* ** *** ****** * *** * **** * **** ******** * *
****** * * * * * * * **** * * ** *** * * **
* * *** * * ** ***** * * * *** ** ***** * * ****

    }

    return 0;

}
answered by (-136 points)
0 like 0 dislike
Hidden content!
#include <stdio.h>

#include <stdlib.h>

#include <string.h>

int main()

{

    char rev[10]="", inputarr[50]="",comparr[10]="reverse";

    int i;
****** * ** *** ** * ** *** ******* ** ** * * * *

    if(strcmp(rev,comparr)==0)

    {


*** ** * * ** ** ** * ** *** * ** * ** * **** ** *
*** * *** * * * *** * * ** * ** ****** l,k,m;
***** * ***** * * * *** * * ** * ** ** ******** ***
* ** ** **** ** ***** * *** ** * * * * * * * (i=l-1;i>=0;i--)

        {
**** * ** * *** ** *** * **** * * *** * * *** ** * * * *** * *** *** * ')
* ** ** * * *** * *** ** *** *** * * * ** ** * * ** * ** ***** *
** *** * * ** * * ** ** *** ** * **** ** * * * * * * * **** *** * *** ********* *** ** ** * * **
* ** ** * ** **** * * * **** * * **** * * **** ** * ** ** ******** ** * * ** * * * *
** * * * * ** * *** ** ** ** * * * ******* ** ** ** ***** * * * * ** * * ***** * * * ** * * ** **** *** * *** * ** **
* * ** ** *** * *** ** * ****** *** * *** ** ** **** ** *** * *** * ***** ** * ***
*** ** * ***** ****** ****** * * * ***** * ** ***** * ** *** * *** ** * ** ** *** *** ** ");
** ***** ********** * * * * ** * ** *** ** * *** * *** * * ** **** * ** * * ** * ***** *
* * ** * * * ** * ** *** * ** ******** * ** * ** * * **** **
* * * * * **** * * * * * * * * ** ** ** ** ** * ** * **** * * * **
* ***** **** * * *** ****** ** **** ***** ***** * * * * * * * ***
** *** * *** ** * * *** *** * * * **** * ***** *** ****** * ** *** ** * * * * ***
****** ** * * *** * * * * ***** * ** **** ***** ****** ** * * * ***** *** **** ** *** * ******
* ****** * *** ***** ** ** **** ** ** * ** ** *** ** * ** *** ** *
** **** ** * ** ** *** * ****** **** **
** ** * * ** * *** ** ** * *** ** ** ** ****** * *** *** * *

    }

    return 0;

}
answered by (-136 points)
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.69.130.93
©2016-2025

Related questions

0 like 0 dislike
50 answers
[Exercise] Coding (C) - asked Mar 16, 2017 in C
ID: 22973 - Available when: Unlimited - Due to: Unlimited
| 6.2k views
0 like 0 dislike
111 answers
asked Mar 16, 2017 in C by thopd (12.1k points) | 13k views
0 like 0 dislike
87 answers
[Exercise] Coding (C) - asked Mar 2, 2017 in C
ID: 22313 - Available when: Unlimited - Due to: Unlimited
| 10k views
0 like 0 dislike
82 answers
[Exercise] Coding (C) - asked Mar 9, 2017 in C by thopd (12.1k points)
ID: 22674 - Available when: Unlimited - Due to: Unlimited
| 8.8k views
0 like 0 dislike
18 answers
[Exercise] Essay (Open question) - asked Apr 20, 2017 in C
ID: 24219 - Available when: Unlimited - Due to: Unlimited
| 3.7k views
12,783 questions
183,442 answers
172,219 comments
4,824 users