Write a program to display the command line arguments in reverse order.

C File =>

/* Write a program to display the command line arguments in reverse order */


#include<stdio.h>
#include<stdlib.h>
int main(int argc,char * argv[])
{
int i;
for(i=argc-1;i>0;i--)
  printf("\n Argument [%d] is : %s",i,argv[i]);
return 0;
}


Comments

Popular posts from this blog

Write a program to allocate memory dynamically for n integers. Accept the elements and calculate their sum and average

C program to accept names of n cities and search for city named “Pune”.