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
Tysm for Ace! :O<br> Hurray!
professor190 [17]

Answer:

Good job!! You deserve it.

Explanation:

3 0
3 years ago
Read 2 more answers
A network administrator needs 10 prevent users from accessing the accounting department records. All users are connected to the
mojhsa [17]

Answer:

C

Explanation:

6 0
3 years ago
Read 2 more answers
Select the correct answer.
S_A_V [24]
I think the answer is b
5 0
3 years ago
What is the purpose of a mail merge field?
Alex73 [517]

Answer:

to set up placeholders in a document where data will be inserted

4 0
3 years ago
Read 2 more answers
____ 59. Suppose that x and y are int variables, ch is a char variable, and the input is: 4 2 A 12 Choose the values of x, y, an
Vlada [557]

Answer:

d. This statement results in input failure.

Explanation:

We are taking input of 3 variables only and those are x,ch,and y. cin is a C++ keyword used take input entered by the user onto the screen cin is not a variable.

The input should of type int char int as written in the code. First is x and character variable ch and then the integer variable y and there should be only three inputs.

8 0
4 years ago
Read 2 more answers
Other questions:
  • It is difficult to use screening questions in computer-assisted surveys. <br> a. True <br> b. False
    8·1 answer
  • I don’t know technically
    9·2 answers
  • Device that converts sound into electrical signals, which are sent to the computer or other recording device
    6·1 answer
  • What is FireWire?
    7·2 answers
  • What is the acronym that helps you remember the order of math operations?
    9·2 answers
  • What is the device that uses sprockets along a film's perforated edges to run 50 feet of film in thirty seconds? A. cinematograp
    10·1 answer
  • It takes 2.5 yards of material to make a dress harleys clothing design estimates that they can produce 48 dresses each week.if t
    15·2 answers
  • What is the nearest ten cents of 453.56
    5·1 answer
  • If anyone gotta ps4, i'm a 15 yr old female n if u wanna b frens, hmu :))
    8·2 answers
  • The different languages that follow specific RULES. These languages use commands
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!