Computer Systems: A Programmer's Perspective (3rd Edition)
3rd Edition
ISBN: 9780134092669
Author: Bryant, Randal E. Bryant, David R. O'Hallaron, David R., Randal E.; O'Hallaron, Bryant/O'hallaron
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 8, Problem 8.21HW
What are the possible output sequences from the following
____________________________________code/ecf/waitprob3.c
Expert Solution & Answer
Trending nowThis is a popular solution!
Students have asked these similar questions
//Kent Anthony Sunquit
//EDP 101(9401) 8:00-9:00
Creat a program highlighting the use of
cout, \n t, and endl commands.
Course code
Course name
Time
Course Description
Computer fundamentals and Programming
9401
EDP 101
8:00-9:00
9386
DRAW 102
COMPUTER AIDED DRAFTING
9:00-10:00
9438
BME 213
BASIC ELECTRICAL ENGINEERING
2:30-3:30
10297
CEE 117
STATICS OF RIGID BODIES
12:30-1:30
9439
BME 211
ME THERMODYNAMICS 1
1:30-2:30
9335
CEE 112
BASIC OCCUPATIONAL SAFETY AND HEALTH
3:30-4:30
10387
CEE 109
ENGINEERING ECONOMICS
3:30-4:30
9301
CEE 104
DIFFERENTIAL EQUATIONS
6:30-7:30
9319
CEE 105
ENGINEERING DATA ANALYSIS
8:30-9:30
This is my First Programming Output
Your C/C++ program must require a single command line argument, the name of an input file. The input file will be made up of lines with one or more integer values per line between -10 and 10, separated by a single space. For each line in the input file your program must output: • the line number of the input file (starting with line #1) • a single space • the integer sum of the numbers on that line • a single space • the smallest number on that line • a single space • the largest of the most frequent numbers on that line • a new line
Example input file Expected output to console
10 7 4 5 1 26 4 10
Create a program base on this question with the Algorithm/Pseudocode
Language:C++
The SM_Menu.txt' file base on the question:
Bakso_Biasa RM5.50
Bakso_Istimewa RM7.00
Bakso_Netizen RM15.00
Bakso_Rusuk RM15.00
Bakso_Telur RM8.00
Bakso_Urat RM10.00
Mee_Ayam_Biasa RM7.00
Mee_Ayam_Istimewa RM12.00
Nasi_ayam_geprek RM6.00
Nasi_ayam_penyet RM6.00
Nasi_Bakar_Ayam_Petai RM6.00
Nasi_Bakar_Kambing RM10.00
Nasi_Bakar_Kerang RM7.00
Nasi_Bawal_Bakar RM18.00
Nasi_Bawal_penyet RM18.00
Nasi_keli_bakar RM8.00
Nasi_keli_penyet RM7.00
Nasi_sup_daging RM9.00
Nasi_sup_perut RM9.00
Nasi_Talapia_Bakar RM15.00
Nasi_talapia_penyet RM15.00
Sup_daging RM7.00
Sup_perut RM7.00
Sup_tulang RM10.00
Chapter 8 Solutions
Computer Systems: A Programmer's Perspective (3rd Edition)
Ch. 8.2 - Prob. 8.1PPCh. 8.4 - Prob. 8.2PPCh. 8.4 - Prob. 8.3PPCh. 8.4 - Prob. 8.4PPCh. 8.4 - Practice Problem 8.5 (solution page 797) Write a...Ch. 8.4 - Practice Problem 8.6 (solution page 797) Write a...Ch. 8.5 - Practice Problem 8.7 (solution page 798) Write a...Ch. 8.5 - Prob. 8.8PPCh. 8 - Prob. 8.9HWCh. 8 - In this chapter, we have introduced some functions...
Ch. 8 - How many hello output lines does this program...Ch. 8 - How many "hello' output lines does this program...Ch. 8 - Prob. 8.13HWCh. 8 - How many hello output lines does this program...Ch. 8 - How many "hello lines does this program print?Ch. 8 - Prob. 8.16HWCh. 8 - Prob. 8.17HWCh. 8 - Consider the following program: Determine which of...Ch. 8 - How many lines of output does the following...Ch. 8 - Use execve to write a program called my1s whose...Ch. 8 - What are the possible output sequences from the...Ch. 8 - Write your own version of the Unix system function...Ch. 8 - One of your colleagues is thinking of using...Ch. 8 - Modify the program in Figure 8.18 so that the...Ch. 8 - Write a version of the fgets function, called...
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
True or False: A static member method may refer to nonstatic member variables of the same class at any time.
Starting Out with Java: Early Objects (6th Edition)
A NOR gate can be considered as an OR gate followed by an inverter.
Digital Fundamentals (11th Edition)
Lottery Winners Modification Modify the program you wrote for Programming Challenge 2 (Lottery Winners) so it p...
Starting Out with C++ from Control Structures to Objects (9th Edition)
The ____________ is always transparent.
Web Development and Design Foundations with HTML5 (8th Edition)
Give an output statement that will produce the following message on the screen: The answer to the question of L...
Problem Solving with C++ (9th Edition)
Given that y=ax3+7, which of the following are correct Java statements for this equations? int y = a x x x +...
Java How To Program (Early Objects)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- In C/C++, What is the range of values a unsigned int can hold on a computer where an integer is made up of 3 bits? Which of the following variable names is not considered to be of bad coding style? LARRY33 numberOfHorses NumberOfCows axvasdfarrow_forwardFill in the blanks: Q. Common __________________ Access is Better known as _______________.arrow_forwardQ4 What is the compiled MIPS assembly code for the following C code? CMassoS no ouoolidonA seugmoto taeT onlinc int x = 0; int y = 1; int z; = sum(x, y);aluoineq aol aoonaupsa ebco owi neewed abbibeb at gnivil al engisob 1eoligmoo A TO x = X-z; eloet onhwollot orlt beilgque evert aengiaeb eiawons int sum(int g, int h) sesio noilounten rtoas 1ot 19 int f; f = (g + h); return f; ealbyo lo) 19 Snoilounteni eq aboo owt gnhebienoo ei nethw 1eligmoo ertt inemetela opeupnst level-rigirl 1aluoiheq s 1 be initialized at the beginning of the code. The argument of sum procedure should be saved in $a0 and $a1. The result f should be saved in $v0. Your answer must include your own comments for the MIPS code. Students must use the instructions studied in the class (in the slide) for programming.rt eetuoexe eoneupee ebos ra Setest ed liw soneupee eboo rts feonsupee riose ot 190 spvA er) ei .22e00g noitsluolso ert ebuloni taurm newans nuoy ((arrow_forward
- Dear expert Can you please write a C code (NOT NOT C# c sharp) that shows a menu of two options 1- transform images i.e.(takes an input COLOURED image and transform it into BLACK & WHITE ) 2- Encrypt an image the program should be in C formate, has function prototypes & .h files PLEASE DONT GIVE ME A CODE COPIED FROM OTHER PEOPLE FROM GITHUB WHERE ALL THE (.h) FILES ARE MISSING AND I KEEP RUNNING ERRORS THE CODE SHOULD RUN SUCCESSFULY PLZ SHOW ME SCREENSHOTS OF THE PROCESS so i can also rate the answerarrow_forwardComplete the following Questions of SAS Program: In order to read in raw data that you type directly into the SAS interface you must use the _________ statement. What are the three types of informats? Give an example of each. Informats are used in the ______________ statement after the variable name.arrow_forwardOnly C programing Language Attention : Your answer file name will be your school number-Q1.cpp (ex: 190201231-Q1.cpp) Engineering Faculty wants to employ research assistants. The information of the candidates who want to be employed as research assistants are written in the sequential access file (candidate.txt) by the registration office, respectively, name, surname, school graduation grade, Academic Personnel and Postgraduate Education Entrance Exam score and foreign language level exam score. All numerical information is being written as decimal numbers(float). Engineering Faculty is to use that candidate.txt file to calculate the total scores of each candidate. When calculating the candidate's total score, 25% of the school graduation grade, 50% of the Academic Personnel and Postgraduate Education Entrance Exam score, and 25% of the language score are being taken into consideration. Write a program that reads the entire candidate.txt file and calculates the total score of each…arrow_forward
- this is Computer architecture! WRITE THE PROGRAM IN MIPS LANGUAGE! The assignment is to create a MIPS programs that the determines what the ECC code should be for a given number (an 8-bit byte). ECC Hamming codes are explained on pages 420-424 in your text. The codes you create are to work for 8-bit positive numbers as these are simpler to work with than larger numbers. The program is to request the user to enter a byte of data (a positive integer in the range of 0 to 255 in decimal) and then create the 12-bit Hamming code as described in your text (see above). The program is to then output this (with an appropriate label) in hex. Make certain that you have lots of comments in your code as this is in MIPS. Also make the code neat: line up the instruction columns, the register columns, and the comment fields (see page 134 in your text for a nice example). For this assignment, turn in your code, a screenshot showing a working for a test case SHOW THE PROGRAM WORKING PLEASEarrow_forwardFileAttributes.c 1. Create a new C source code file named FileAttributes.c preprocessor 2. Include the following C libraries a. stdio.h b. stdlib.h c. time.h d. string.h e. dirent.h f. sys/stat.h 3. Function prototype for function printAttributes() main() 4. Write the main function to do the following a. Return type int b. Empty parameter list c. Declare a variable of data type struct stat to store the attribute structure (i.e. statBuff) d. Declare a variable of data type int to store an error code (i.e. err) e. Declare a variable of data type struct dirent as a pointer (i.e. de) f. Declare a variable of data type DIR as a pointer set equal to function call opendir() passing explicit text “.” as an argument to indicate the current directory (i.e. dr) g. If the DIR variable is equal to NULL do the following i. Output to the…arrow_forwardwould you write the c++ program which is written in pseudocode: Code 1: input file A contains numeric values output File A is sorted a ← read Value (A) while not End Of File (A) performs b ← read Value (A) if a > b then return false end if a ← b end while return true Code 2: input files A and B are sorted according to Code 1 output The file C contains all values from A and B in sorted order a← read Value (A) b ←read Value (B) while not End Of File (A) And not End Of File (B) perform. Determines which value to write to C if a < b then Write a to C a ← read Value (A) else Write b to C b← read Value (B) end if end while. A or B is over, write both clearly while not End Of File (A) performs Write a to C a← read Value (A) end while while not End Of File (B) performs Write b to C b← read Value (B) end whilearrow_forward
- Write a C++ program that reads two items from a data file, the bit string itself and the parity required, and then adjusts the bit string and then expresses both the original string and the parity adjusted string in hexadecimal form.Sample Run:Enter the bit string and parity (EVEN or ODD): 10110101 EVENOriginal Hex Value: B5Parity Adjusted Hex Value: 16Barrow_forwardComplete the following Questions of SAS Program: A SAS Statement always end with what punctuation? (Know how to identify how many statements exist in a data step when given an example code) What are the variable types? Temporary Data Sets are saved to the ________ library? Give an example of a SAS Data Set Name. (Know the parameters when naming SAS Data Sets)arrow_forwardWrite an LMC code for the following:presentation should be zipped with a text file wishich a simple documentation of not more than 2 paragraphs explaining the process and code you used. 1. A program that loads and outputs the value 10.2. A program that adds (3) inputs and outputs the result3. A program that outputs the larger of 5 input values4. A program that outputs 6 input values in ascending order5. A program that outputs 3 inputs and subtracts the third from the first (2) if the result is negative the program should subtract the sum of the first two from the third numberarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Systems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage Learning
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning
Linux - Tutorial for Beginners in 13 MINUTES! [ UPDATED ]; Author: bai;https://www.youtube.com/watch?v=BMGixkvJ-6w;License: Standard YouTube License, CC-BY
What is Linux?; Author: Techquickie;https://www.youtube.com/watch?v=zA3vmx0GaO8;License: Standard YouTube License, CC-BY
Introduction to Linux and Basic Linux Commands for Beginners; Author: sakitech;https://www.youtube.com/watch?v=IVquJh3DXUA;License: Standard Youtube License