#include <stdio.h>
int main(int argc,char *argv[])
{
int len;
char *ptr;//take pointer to traverse
ptr=argv[1];
len=strlen(argv[1]);
if(argc==1){
printf("Error:Please enter atleast one argument");
return 0;
}
while(len>=0){
printf("%c ",ptr[len--]);
}
return 0;
}
int main(int argc,char *argv[])
{
int len;
char *ptr;//take pointer to traverse
ptr=argv[1];
len=strlen(argv[1]);
if(argc==1){
printf("Error:Please enter atleast one argument");
return 0;
}
while(len>=0){
printf("%c ",ptr[len--]);
}
return 0;
}
No comments:
Post a Comment