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
Where (what memory location) is the data read from for the following code:
alexdok [17]

Answer: ORG $3000 tell us that we want to load the program from the address $3000.

LDAA #$C2 tell us to load the value contained in the address present in the register C2 into the accumulator.

Explanation:

ORG instruction in  microprocessor does not have a fixed address. It tell us where to begin the execution of the program by loading into a starting address space. It does not uses fixed addressing

LDAA instruction uses indirect addressing by placing the value from the address present in the register. Here  the address is contained in register C2.

6 0
3 years ago
It is an island country; it fought against us in World War II; it is known for sushi.
aivan3 [116]

Answer:

The country is Japan

5 0
3 years ago
Read 2 more answers
Which routing protocol does an exterior router use to collect data to build its routing tables?
natita [175]

Answer:

D. BGP

Explanation:

In order to exchange routing information with another AS (Autonomous Systems) only, exterior routers use an exterior routing protocol, like BGP (Border Gateway Protocol) or EGP (Exterior Routing Protocol).

BGP is an application-layer protocol in the TCP/IP suite, that uses a well-known TCP port (179) in order to deliver information reliably.

It is important to note that in order to exchange routing data within his own AS, the router uses an interior routing protocol, like OSPF.

3 0
3 years ago
Which of the following is NOT areserved word in Java?intpublicstaticnum
Rama09 [41]

Answer:

num

Explanation:

In java reserved words are also known as keywords, keywords are reserve words for a language that can't be used as an identifier(name of a class, name of a variable, name of an array etc.) int, public static, are reserve words.

In given question num is not a reserved word.

6 0
2 years ago
-Which of the following is true about Web services?
Lynna [10]

Answer:

The answer is "Option D".

Explanation:

Web service is also known as an online open software product, which uses a common XML messaging service system. It is used service like HTTP, SOAP, etc, that encrypts messages from all web services.

  • It uses the internet, that enables you the interface or application for the user interaction or exchanging data.
  • It will turn the software into web apps.
7 0
3 years ago
Other questions:
  • What is faster a hi-speed usb port or superspeed usb port?
    13·1 answer
  • In mathematics, the factorial of a positive integer n, denoted as n! , is the product of all positive integers less than or equa
    10·2 answers
  • Write a program with a loop that lets the user enter a series of positive integers. The user should enter −1 to signal the end o
    7·1 answer
  • Lisa managed incident response for a bank. The bank has a website that’s been attacked. The attacker utilized the login screen,
    9·1 answer
  • A library function that can find one string inside another is:
    9·1 answer
  • Write a program with total change amount as an integer input, and output the change using the fewest coins, one coin type per li
    11·1 answer
  • A business traveler notices there is an extra connector between the keyboard and the computer, in a business center. She has mos
    12·1 answer
  • Suppose a host has a 1-MB file that is to be sent to another host. The file takes 1 second of CPU time to compress 50%, or 2 sec
    12·1 answer
  • Deb needs to add borders on the cells and around the table she has inserted into her Word document.
    7·1 answer
  • Difference between electrical and electronic devices
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!