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
postnew [5]
3 years ago
5

Please develop a C program to reverse a series of integer number (read from the user until EOF issued by user) using stack ADT l

ibrary. Please include c code and three sample run demonstrations with at least 10 different numbers each time.
Computers and Technology
1 answer:
EleoNora [17]3 years ago
8 0

Answer:

#include <stdio.h>

#define MAX_CH 256

int main(void) {

int ch, i, length;

char string[MAX_CH];

for (;;) {

for (i = 0; i < MAX_CH; i++) {

if ((ch = getchar()) == EOF || (ch == '\n')) break; string[i] = ch; }

length = i;

if (length == 0) { break; }

for (i = 0; i < length; i++) { putchar(string[length - i - 1]); }

putchar('\n');

}

return 0;

}

Explanation:

  • Take input from user until the end of file.
  • Reverse the string using the following technique:
  • putchar(string[length - i - 1])
You might be interested in
6. Assume a processor supports all instructions and addressing modes. A program consists of 25% store words, 15% load words, 10%
Sloan [31]

Answer:

After checking the attached picture, come to this calculated "Total Time".

Total time 'T'

T = (0.25)(200) + (0.15)(200) + (0.1)(250) + (0.05)(175) + (0.45)(75)

T = 147.5 ps

8 0
3 years ago
What statement BEST explains the relationship between these two facts
MaRussiya [10]
Chocolate is now a sweet treat that is very popular in the us
8 0
3 years ago
Read 2 more answers
Nims is applicable to all stakeholders with incident related responsibilities. True or False
QveST [7]

Answer:

True

Explanation:

National Incident Management System (NIMS) is intended to be used by all individual regardless of there positions. it is aimed with the responsibility of enrolling and issuing Nigerians with national identity cards regardless of the position,degree, or family background.

6 0
3 years ago
Read 2 more answers
A journalist uses a video camera to capture an interview. This video camera is an example of _____.
Igoryamba
<span>A journalist uses a video camera to capture an interview. This video camera is an example of  hardware.</span>
5 0
3 years ago
PLEASE HELP
g100num [7]

Answer: B

Explanation:

3 0
3 years ago
Read 2 more answers
Other questions:
  • A technician wants to create a new partition on a new additional hard drive. what tool should be used?
    15·1 answer
  • What exactly does the value recorded in a single dimension of a sift keypoint descriptor signify?
    15·1 answer
  • __ are designed to be used with everyday objects, such as home appliances, gaming consoles, digital cameras, e-readers, digital
    13·1 answer
  • Why is stranded rather than solid cable used for patch cables? Why is it critical not to score the jacket too deeply when stripp
    12·1 answer
  • A common and extremely useful feature of most online dictionaries is
    12·1 answer
  • Which of the following is not a characteristic of a good value log entry
    15·1 answer
  • A security team has downloaded a public database of the largest collection of password dumps on the Internet. This collection co
    9·1 answer
  • What tells the hardware what to do and how to do it?
    9·1 answer
  • Explain basic anatomy of computers.
    13·2 answers
  • What programs are most likely affected by a macro virus?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!