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
A professional bureaucracy is a knowledge-based organization where goods and services depend on the expertise and knowledge of p
PtichkaEL [24]

Answer:

True

Explanation:

<em>Professional bureaucracy</em> is considered as a combination of professionals withing a government or private organization, these professionals are relied on to achieve productivity and are involved in making major decisions or implementing major regulations that decide the future of the organization.

In other words, professional bureaucracy grants employed professionals flexibility in carrying out their responsibilities in the organization, i.e., greater control of their duties.

6 0
3 years ago
You receive a file named Project4.xlsx as an attachment to an email message. What do you expect the file to contain?
GaryK [48]
.xlsx is an extension for Microsoft Excel. It's basically a project using Excel.
5 0
3 years ago
WHAT IS ONE WAY A PIVOTTABLE COULD COMBINE THE FOLLOWING DATA
Gemiola [76]

Answer: You sort table data with commands that are displayed when you click a header arrow button. Hope it help's :D

7 0
3 years ago
HELP URGENT
hram777 [196]
You should structure the text first before you search for a relevant picture
7 0
3 years ago
Read 2 more answers
In the layers toolbar, which layer will appear in front of your game
nekit [7.7K]
The top layer will appear.
5 0
3 years ago
Other questions:
  • Which statement describes the word "iterative"?
    7·2 answers
  • _____ allow(s) a user to double click with the mouse in a document to move the insertion point to a new location.
    11·1 answer
  • For a loop counter, the appropriate data type would be:
    14·1 answer
  • Consider the following recurrence, defined for n a power of 4 (for the time of some algorithm): T(n) = 3 if n = 1 2T(n/4) + 4n +
    10·1 answer
  • How many bits would be needed to count all of the students in class today there is 20 students
    6·1 answer
  • Match letters from column B to Column A by looking at the picture above.
    11·1 answer
  •  Which device containing sensors send signals to the computer whenever light changes are detected? 
    11·1 answer
  • What is an operating system?<br>​
    11·2 answers
  • Released in 1976, the Apple I was Apple Computer's first product.<br><br> O True<br> O False
    6·1 answer
  • Discuss the term internal control​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!