// KEEP THE FOLLOWING include DIRECTIVE ...
#include "singly_linked_list/singlyLinkedList.h"
// YOUR DEFINITION OF FUNCTION deleteFront GOES HERE
...
#include<cstdlib>
#include "singly_linked_list/singlyLinkedList.h"
void deleteFront(node *head)
{
int item;
node *prev;
prev= head;
head=head->next; // head pointer to point to next node of existing head node.
item= prev->data;
free(prev);
return item;//return deleted node contents
}
Write a C function named deleteFront Assume that file singlyLinkedList.h exists (in directory singly_linked_list) and contains...
Write a C function named front singlyLinkedList.h File Reference #include "node.h" #include "list.h" #include "construct.h" #include "insertFront.h" #include "front.h" Assume that file singlyLinkedList.h exists (in directory singly_linked_list) and contains all structures and function except front. // KEEP THE FOLLOWING include DIRECTIVE ... #include "singly_linked_list/singlyLinkedList.h" // YOUR DEFINITION OF FUNCTION front GOES HERE ...
6. Code writing: There exists an input file named “students.txt” that contains student NetIDs and GPAs. An example is shown on the right; the format is one student per line, with one or more spaces between the NetID and GPA. Write a complete C program that opens this file, inputs the data, and prints the NetID and GPA of every student with a GPA < 2.0; assume the file will open successfully. User-defined functions are not required, and arrays are...
1.) Write a recursive function named isPalindrome that will take a single string as an argument and determine if the argument is a palindrome. The function must return True if the argument is a palindrome, False otherwise. Recall that any string is a palindrome if its first and last characters are the same and the rest of it is also a palindrome (therefore, a single character is a palindrome): 2.) Consider a text file named samplestrings.txt that contains a collection...
average_value_in_file / Python 3.x: Your assistance is appreciated, thank you! Write a function named average_value_in_file that accepts a file name as a parameter and reads that file, assumed to be full of numbers, and returns the average (mean) of the numbers in that file. The parameter, filename, gives the name of a file that contains a list of numbers, one per line. You may assume that the file exists and follows the proper format. For example, if a file named...
java
Write a method named printEntireFile that prompts the user for a file name and points the contents of that file to the console as output. You may assume that the file exists. For example. If the file example. txt contains the following input data: Then the following would be an example dialogue of your method:
20. Write the DOS command to erase a file named FILEBILL which is stored in the sub-directory named MYFILES located at the root of drive C. 21. Write the DOS command to return you to the root of drive C if your current directory is C:\TEACHING OPSYS\SUMM 22. Write the DOS command to erase all the files on drive A. 23. Write the DOS command to delete a subdirectory named DIRFRED which is located at the root of drive C....
Problem 3 Write a function named repeat_words that takes two string parameters: 1. in_file: the name of an input file that exists before repeat_words is called 2. out_file: the name of an output file that repeat_words creates Assume that the input file is in the current working directory and write the output file to that directory. For each line of the input file, the function repeat_words should write to the output file all of the words that appear more than...
Write a simple telephone directory program in C++ that looks up phone numbers in a file containing a list of names and phone numbers. The user should be prompted to enter a first name and last name, and the program then outputs the corresponding number, or indicates that the name isn't in the directory. After each lookup, the program should ask the user whether they want to look up another number, and then either repeat the process or exit the...
Python 3.6
Question 12 (2θ points) write a function named uniqueWords that counts how many different words there are in each line of an input file and writes that count to a corresponding line of an output file. The input file already exists when uniqueWords is called. uniquewords creates the output file. Input. The function uniquewords takes two parameters: ◆ inFile, a string that is the name of text file that is to be read. The file that inFile refers...
LINUX 140U Create a file named script1.sh that contains a bash script that: Accepts NO command line arguments and does NOT use the read command. I will give you no credit if your bash script includes a read command. Also, you need to have at least one for..in loop in your code even if there may be other ways to do this problem. The script will go through a list of entries in the current directory (do not process subdirectories):...