Write a program to reverse the given string?

1 answer

Answer

1061202

2026-04-14 03:40

+ Follow

Use for loop

declare string array str[] and string variable

l= string length of string array

j=l

for i=0 to i=l/2 then

temp=str[i]

str[i]=str[j-1]

str[j-1]=temp

j=j-1

now print str array it will be reversed

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.