Submit to Blackboard before the deadline. You will be able to revise your answers until the deadline with no penalty.
IMPORTANT: By submitting your answers, you are certifying that these answers have been exclusively your own work. All students enrolled in this course are expected to adhere to the UT Arlington Honor Code:
I pledge, on my honor, to uphold UT Arlington's tradition of academic integrity, a tradition that values hard work and honest effort in the pursuit of academic excellence. I promise that I will submit only work that I personally create or contribute to group collaborations, and I will appropriately reference any work from other sources. I will follow the highest standards of integrity and uphold the spirit of the Honor Code.
If you are using C, C++, or Java, your program should take one command line argument. For example, in C, if your compiled program is called a.out, you should call the program as follows:
a.out filenameCommandline argument
filename
should be the name of a file containing expressions to be evaluated, such as in1.txt. There should be one expression per line.
To help you get started, we provide the following resources:
As an example, if you run your solution using file in1.txt as the input file, you should get the following output:
-------------------------------- processing: (5 * (((9 + 8) * (4 * 6)) + 7)) infix tokens: ( 5 * ( ( ( 9 + 8 ) * ( 4 * 6 ) ) + 7 ) ) postfix tokens: 5 9 8 + 4 6 * * 7 + * result: 2075 -------------------------------- processing: -------------------------------- processing: ((17 * (12-5)) + (9 / 3)) infix tokens: ( ( 17 * ( 12 - 5 ) ) + ( 9 / 3 ) ) postfix tokens: 17 12 5 - * 9 3 / + result: 122
Write a function that takes a string as an argument and prints out a table giving, for each character that occurs in the string, the character and its frequency of occurrence (the number of times that the character occurs).
Write a function that takes a string as an argument, and that checks whether that string is a palindrome (reads the same backward or forward), ignoring blanks. For example, your program should report success for the string "if i had a hifi"
.
Write a function that takes in a string as an argument, and that replaces substrings of more than one blank in a given string by exactly one blank. Note that this function should modify the contents of its input argument, as opposed to returning a new string that has the required modifications.
Write a function countEdges(int ** adjacencies, int A, int B, int V)
that takes as input the adjacency matrix of graph, two integers specifying vertices A and B, and an integer V specifying the number of vertices in the graph. The function should return the number of vertices C with the property that there is an edge from A to C and from C to B. You can assume that the graph is undirected.
Using the conventions of Textbook Exercise 4.6, give a way to insert asterisks in the sequence E A S Y so that the sequence of values returned by the pop operations is:
The assignment should be submitted via Blackboard. Submit a ZIPPED directory called assignment.zip. No other forms of compression are accepted, contact the instructor or TA if you do not know how to produce .zip files. The zipped directory should contain the following documents:
IMPORTANT: Pay close attention to all specifications on this page, including file names and submission format. Even in cases where your answers are correct, points will be taken off liberally for non-compliance with the instructions given on this page (such as wrong file names, wrong compression format for the submitted code, and so on). The reason is that non-compliance with the instructions makes the grading process significantly (and unnecessarily) more time consuming. Contact the instructor or TA if you have any questions.
Back to the list of assignments.