C/C++

Questions & Answers

Programming Challenge: 25 - Student Line Up Using Files The program should prompt the user for the file name and read the data from the file. A suitable file of names (List of Random Names) is provided on Moodle. Note that these names might include spaces; handle your input accordingly. The expected output is two names; do not show the entire file (or you will regret that code when you do the associated programming quiz that processes thousands of names). Do not use arrays or sorting for this problem! Deliverables: Program file (PC5-25.cpp) and screen shot (using the RandomNames.txt file) for this Programming Challenge.


Match the appropriate function header to the description (assume the functions are independent, that is, even though they have the same name they are not intended to represent an overloaded function):


One of the function definitions given below is added at line 3. Match the resulting output from the program to the function definition:


The following program is designed to read in a number from the user, check if it is between 1 and 10, if not, the user is repeatedly they entered: What, if any, statement needs to be added to line 12 to make this program work? Select one: O a. return 0; O b. continue; O c. exit; O d. cycle; O e. break; O f. cout << "Valid input!";


In this assignment, you are asked to write a twitter content moderator software that: 1) Provides two different sets of users: a. the user: those who will read and write tweets. b. the managers: those who will set the content not allowed in the platform. 2) Displays the top 10 most dangerous users with blocked content 3) The user statistics based on reputation score


Write a C program, mysh, which simulates the Unix sh for command processing. Modify lab2 base.c to meet requirements of the task. IDE is VS code.


Define a problem with input, output, and Operator Overloading. If no output explain the reason why and what you are going to do make sure it does not happen again aka learning from your mistakes. Problem:Design:Code:Output:


Assignment: Create a simple “shell” program that performs the following: 1. In a loop, prompt the user for a command and parameters. (fgets is a good tool for this) 2. When a command is given, insert the command and the parameters into an array of C strings. Use strtok to tokenize the string. Fork the process and have the parent wait for the child to complete. Have the child execute the given command using execvp execute command. Here’s POSIX documentation on exec. 3. Loop until the user enters “exit”. 4. Your program doesn’t have to do pipes(|), redirects (> or >>), or history1. Your program will prompt the user for input that will be executed. So if I was to type: ls -al you would execute the command and pass -al to the command (using execvp). The command ls with appropriate options would execute and display its output to the screen. The program will then prompt again and wait for the next input, until exit is entered. Read Programming Project 1 at the end of chapter 3 of our book. It’s similar to what I am asking you to do, except, you don’t have to do pipes, redirects, and history (it is discussed in the book though). Submit three files (simpleShellYourNAME.c, Makefile, and README2) as your assignment. Once you have the files on your machine, zip them and upload to WesternOnline. README file should explain what problem your program solves and how to compile and use it, and make, when executed, should compile everything correctly.


Write a C++ program on repl.it to simulate the execution of the MIPS 5-stage pipeline processor with no forwarding. Inputs: MIPS assembly program from a text file using only the following MIPS instructions: • add • sub • and • addi • Iw • SW • bne • beq • nop (no operation)


Define a problem with input, output, and Exception Handling. If no output explain the reason why and what you are going to do make sure it does not happen again aka learning from your mistakes. Problem:Design:Code:Output:


No Question Found forC C

we will make sure available to you as soon as possible.