WAP to copy the value of one array into another array in reverse order

Defination :: WAP to copy the value of one array into another array in reverse order

Source Code ::

void main()
{
    char n[20];
    int no,a=0;
    clrscr();
    printf("enter string");
    scanf("%s",n);
    for(no=0;n[no]!='\0';no++)
    {
        a++;
    }
    for(no=a-1;no>=0;no--)
    {
        printf("%c",n[no]);
    }

getch();
}
WAP to copy the value of one array into another array in reverse order WAP to copy the value of one array into another array in reverse order Reviewed by Unknown on 21:44 Rating: 5

No comments:

Powered by Blogger.