Menu

[Solved]Write Output Following Code Line Line Indicating Line Number Assuming String Input Welcome Q37216485

Write the output of the following code line by line indicatingthe line number. Assuming that the string input is “Welcome to Unixand Linux Shell programming …”

input=”$1″
reverse=””

len=${#input}
for (( i=$len-1; i>=0; i– ))
do
reverse=”$reverse${input:$i:1}”
done

echo “$reverse”

Expert Answer


Answer to Write the output of the following code line by line indicating the line number. Assuming that the string input is “Welco… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *