Sunday, January 1, 2017

REVERSING A KNOWN STRING without using STACK

Hello code lovers !                                Happy New Year 2017 !            
//REVERSING A KNOWN STRING
#include<stdio.h>
int main()
{
    char c[]="Ashutosh_Kumar_Singh";
    for(int i=(sizeof(c)-1);i>=0;i--)
    {
        printf("%c",c[i]);
    }
return 0;
}

No comments:

Post a Comment

How can I run a C++ program directly from Windows?

How-can-I-run-a-C-program-directly-from-Windows