Untitled

 avatar
unknown
c_cpp
2 years ago
374 B
5
Indexable
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <string.h>

int main()
{
   char str[] = "Hello World";
   int length = strlen(str);
   int temp, i, j;
   for (i = 0; i < j; i++)
    for (j = length - 1; j >= 0; j--)
   {
       temp = str[i];
       str[i] = str[j];
       str[j] = temp;
   }
   printf("%s", str );
   return 0;
}
Editor is loading...