include stdio include stdlib include string int main char Hello char t

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
char s[] = "Hello";
char temp;
int n,i;
printf("Enter n: ");
scanf("%d",&n);
for(i = 0; i < n; i++)
{
temp = s[i];
s[i] = s[strlen(s) - i];
s[strlen(s) - i] = temp;
}
printf("%s",s);
return 0;
}