Reverse Digits of a Number using TCS Command Line Arguments

Write a C program which will reverse all the digits of a Number using Command Line Arguments to reverse the digits of a number

Note: Please go through Command Line Arguments Post before preparing for these questions. The theory there  for TCS command line Program will help you in better understanding .

#include<stdio.h>
#include<stdlib.h>
int main(int argc, char *argv[])
{
 if(argc==1)
 {
 printf("No Arguments");
 return 0;
 }
 else
 {
 int n,reverseNumber,temp,rem;
 n=atoi(argv[1]);
 temp=n;
 reverseNumber=0;
 while(temp)
 {
 rem=temp%10;
 reverseNumber=reverseNumber*10+rem;
 temp=temp/10;
 }
 printf("%d",reverseNumber);
 return 0;
 }
}