Write an algorithm that receives a string and reverses it.
Answer Posted / sudip chatterjee
1. Start.
2. Declare Array str1[25], str2[25] as an alphanumeric.
3. Declare i, g, l, as numeric.
4. Assign or accept value to Str1.
5. l=i=0;
6. while(str1[i]!="/0")["/0"last index point that u entered.]
a.increase i, l by 1;
7. Repeat steps i,ii, iii for j from o
i. str2[j]= str1[i-1]
ii. increase j by 1.
iii. decrease i by 1.
8. str2[j]="/0" .
9. Display str2
10. Exit.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
solve the problem in the programming language C++"if a five digit number is input through the keyboard.Write a program to calculate the sum of its digits(hint: use the modulus operator)
Code for Easily Using Hash Table?
write a program that prompt the user to enter his height and weight,then calculate the body mass index and show the algorithm used
Performance Algorithm A performs 10n2 basic operations and algorithm B performs 300 lg n basic operations. For what value of n does algorithm B start to show its better performance?
Write a (n) algorithm that sorts n distinct integers, ranging in size between 1 and kn inclusive, where k is a constant positive integer. (Hint: Use a kn-element array.)
Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.
3. Program to find the Sum of give series. a. (1)+(1+2)+(1+2+3)+(1+2+3+4)+……………………………….. b. 1/1+1/9+1/25+1/49+……………...
Teta-Omeg-Big-Oh Show that f(n) = n2 + 3n3 is ;(n3).
write a program that reverses the input number of n.Formulate an equation to come up with the answer.
write a program to convert temperature from fa height into celcius and vise versa,use modular programming
write a program that creates a sequenced array of numbers starting with 1 and alternately add 1 and then 2 to create the text number in the series , as shown below. 1,33,4,6,7,9,............147,148,150 Then , using a binary search , searches the array 100 times using randomly generated targets in the range of 1 to 150
Code for Two Classes for Doing Gzip in Memory?
How to Split Strings with Regex in Managed C++ Applications?
output for printf("printf");