Test a program that prompts for the user

Assignment Help C/C++ Programming
Reference no: EM13165813

Write and test a program that prompts for the user to input a file name and uses two functions head() and tail() - head() displays the first 10 lines of a file; if the file has fewer than 10 lines, it displays the entire file with a message stating that the entire file has been displayed - tail() displays the last 10 lines of a file; if the file has fewer than 10 lines, it displays the entire file with a message stating that the entire file has been displayed. Submit test runs with fewer and more than 10 lines in the input file.

Reference no: EM13165813

Questions Cloud

You assign each int with a particular id : You assign each int with a particular ID.Array (4, 5, 6, 5, 4, 6) ID (1, 2, 3, 4, 5, 6)
A machine has a 32-bit address space and an 4-kb page : A machine has a 32-bit address space and an 4-KB page. Suppose a simple OS just boot up on the machine, running a single process. The process uses 2 memory pages for the text and data memory (combined) near the lowest virtual address, and 1 memory pa..
If ptr is a pointer to a character : If ptr is a pointer to a character and has been initialized to point to the first element of arr, write a statement using ptr that is equivalent to the statement array[4] = 12.
Various search trees and numerous sorting techniques : This week we were introduced to various search trees and numerous sorting techniques. Taking into consideration what you have learned this week, discuss how you can help Bob with his problem.
Test a program that prompts for the user : Write and test a program that prompts for the user to input a file name and uses two functions head() and tail() - head() displays the first 10 lines of a file
Program to input the length of the side from the keyboard : write a program to input the length of the side from the keyboard ,use the class to obtain the areas of all shapes and display the results on the screen
From time to time words become obsolete : One more requirement, from time to time words become obsolete. When this happens, such word must be removed from the dictionary. Your program must account for this also.
Generate an array of 20 random integers from 0 to 9 : generate an array of 20 random integers from 0 to 9. Search for the first occurrence, if any, of the number 7, and report its position in the array.
Create 4 order class fields : Create 4 Order class fields: order number, customer name, quantity ordered, and total price. Create public accessors for each field except total price.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Displays columns titled "name", "quantity", "price", value

Write a program that displays columns titled "Name", "Quantity", "Price", and "Value". The fourth column contains the result of multiplying each item's quantity by its price. In addition, the program should calculate and display the total value of th..

  Calculate the net pay as the gross less the taxes

Design and code a new function that accepts as parameters the gross pay by value and the federal tax, state tax, local tax, SS tax, and net Pay by reference.

  Write two short c programs and solve exam-style problem

Write two short C programs and solve four exam-style problems.

  In psuedocode, design an application

In psuedocode, design an application that has an array of at least 20 integers. It should call a module that uses the sequential search algorithm to locate one of the values

  Public transport fare ticketing system

Implement and test a public transport fare ticketing system.

  Properly store the number from variable value

1. Statement will properly store the number from variable  value  into the output file object AnsFile?

  Program to compute surface area of sphere using function

Write down a program in C++ to compute surface area of sphere using a function. As sample run, write down the surface areas of spheres with radii.

  Write a function to arrange 10 numbers stored in an arraye

Writ a funtion to arrange 10 numbers stored in an array forom the largest to the smallest and pass the results to main program.

  Find the sixth maclaurin polynomial for sin x

Find the sixth Maclaurin polynomial for sin x and use Chebyshev economization to obtain a lesser-degree polynomial approximation.

  C program to randomly generate more than ten ip address

Write C or C++ program which Randomly generates more than 10 IP addresses written in decimal format and write results in text file (e.g. Dec_IPAddresses.txt)

  Create huffman codes

Write a C++ program to create Huffman codes. Program input is a file called freq.txt (make up your own file for testing) that contains data on the characters in some cleartext file in the form of each character's non-zero frequency of occurrence i..

  Search for the value needle in the array

Search for the value needle in the array range given by [hay_begin ... hay_end), using the Linear Search algorithm. This function will return a pointer to the needle value if it is found, or a null pointer if needle is not found.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd