1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Vikki [24]
3 years ago
13

Write a function called printBackwards() that will work with a C string. The function will print any C string backwards. You don

't need to put in the prototype, but you need to write a complete function.
Computers and Technology
1 answer:
yaroslaw [1]3 years ago
8 0

Answer:

void printBackwards(char s[])

{

   int n=strlen(s)-1;//finding the last index of the string..

   for(int i=n;i>=0;i--)//loop to print the string backwards..

   {

       printf("%c",s[i]);//printing the character of the string..

   }

}

Output:-

abcdefg

gfedcba

Explanation:

I have used strlen function that will be used after including the string.h header file.It returns the length of the string.After finding the last index I have iterated over the c string in reverse order and printing the character of the string one by one.

You might be interested in
What is wrong with a MOV BL, CX instruction?
bagirrra123 [75]

Answer:

The MOV bl , cx instruction is wrong because the contents of cx are to big for bl .

I think this is the answer.

8 0
3 years ago
A palindrome is a word or phrase that reads the same both backward and forward. The word ""racecar"" is an example. Create an al
oee [108]

Answer:

Algorithm for the above problem:

  1. Take a string from the user input.
  2. store the input string on any variable.
  3. Reverse the string and store it on the other variable.
  4. Compare both strings (character by character) using any loop.
  5. If all the character of the string matched then print that the "Input string is a palindrome".
  6. Otherwise, print "The inputted string is not a palindrome."

Output:

  • If the user inputs "ababa", then it prints that the "Input string is palindrome"
  • If the user inputs "ababaff", then it prints that the "Input string is not palindrome"

Explanation:

  • The above-defined line is a set of an algorithm to check the number is palindrome or not.
  • It is defined in English because the algorithm is a finite set of instructions written in any language used to solve the problem.
  • The above algorithm takes input from the user, compare that string with its reverse and print palindrome, if the match is found.
4 0
3 years ago
• Suppose an application generates chunks of 40 bytes of data every 20 msec, and each chunk gets encapsulated in a TCP segment a
kobusy [5.1K]

Answer:

10

Explanation:

i don't know please just thank me

8 0
3 years ago
Chris accidentally steps on another student’s foot in the hallway. He apologizes, but the other student does not want to hear it
sattari [20]

Answer:

He should talk to a trusted adult and fix the problem.

Explanation:

This problem could become even worse and even more than one person could get in on the act.

7 0
3 years ago
Read 2 more answers
The __________ contains the basic elements of a user's program and can be generated directly from a compiled object file
icang [17]

Answer:

costumes

Explanation:

it will make a good impression and will make sure to get the same thing as you can see

3 0
2 years ago
Other questions:
  • Write a program named TypingGrades that allows a user to enter a student’s number of words typed. The output is the letter grade
    9·1 answer
  • A rectangular box that displays information or a program is called
    13·1 answer
  • I need help with this assignment
    10·1 answer
  • All queries have a locale, true or false?
    15·1 answer
  • What is a piece of information sent to a function
    15·1 answer
  • Which of the following statements is true?A)Implicit data type conversion is performed when you mix values of different data typ
    5·1 answer
  • The<br>tool can lighten the part of an<br>image.*<br>Your answer​
    13·1 answer
  • Write a program that lets the user enter the loan amount and loan period in number of years and displays the monthly and total p
    13·1 answer
  • What Microsoft feature enables you to represent text as colorful visuals
    12·1 answer
  • Before creating a graphic, you should _____. Select all that apply. A. export it as an SVG file B. consider whe
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!