WARM
/
March 27, 2008 Name
ECE264 Advanced C Programming
Exam 2
Solve the following problems. The number of points for each problem is shown next to the prob
lem and in the table below. The outcomes corresponding to each question are also shown. Use
on
December 12, 2007
Name _
ECE264 Advanced C Programming Final Exam
Solve the following problems. The number of points for each problem is shown next to the problem and in the table below. The outcomes corresponding to each question are also shown.
ECE 264 Advanced C Programming
Contents
1 Linked List
1
2 Search and Delete in Linked List
8
1 Linked List
So far we have handled data whose sizes are known (1) when the program is written or (2)
when the program starts executing. For the latter, we may u
ECE 264 Advanced C Programming
Contents
1
Sorting Integers using Linked List
1
2
Linked List for String
9
3
Linked List for Structure
1
16
Sorting Integers using Linked List
We can use a linked list to sort numbers based on the idea of insertion sort.
/*
ECE 264 Exam 1 Answer
01:30-02:20AM, February 06, 2009
1 Control Flow (1.5 points)
What is the output of this program?
#include <stdio.h>
int f1(int x, int * y)
cfw_
if (x > 0)
cfw_
* y = -x;
return (x + 1);
else
cfw_
* y = x + 1;
return (x - 1);
int m
ECE 264 Exam 2
01:30-02:20PM, March 06, 2009
1 Structure and Function (4.8 points, outcome 2)
This set of questions asks you to dene a structure called Person and implement the associated
functions. You do not have to write the main function, nor do you n
ECE 264 Final Exam
8-10AM, May 5, 2011
I certify that I will not receive nor provide aid to any other student for this exam.
Signature:
You must sign here. Otherwise you will receive a 1-point penalty.
Read the questions carefully.
Please write legibly. Y
ECE 264 Advanced C Programming
Contents
1
Recursion and Linked List
1
2
Recursion and Iteration
2
1 Recursion and Linked List
Can we also use recursion for a linked list? We will use List search as an example.
int List_search(Node * list, int v)
cfw_
if (
ECE 264 Advanced C Programming
Contents
1 Binary Search Tree
In this example, we will see how to create a binary tree, in particular a binary search tree.
/* btreenode.h */
#ifndef BTREENODE_H
#define BTREENODE_H
typedef struct btreenode
cfw_
struct btree
ECE 264 Advanced C Programming
Contents
1 Stack
1
2 Queue
5
3 Priority Queue
9
4 Doubly Linked List
9
1 Stack
Our current implementation of a linked list puts the newly added value at the beginning
of the list. As a result, it is rst-in-last-out (FILO). H
MA26600
GROUND RULES
FALL 2016
Course Webpage: www.math.purdue.edu/MA266
Homework: There are both hand-graded homework problems and online homework problems. Online homework
is accessed through WebAssign. Due dates for both are determined by your instruct
ECE 264 Advanced C Programming
Contents
1
String
1
2
Manipulating Strings
2
3
sscanf and sprintf
4
4
What is argv?
5
5
Buffer Overow Attack
6
1
String
What is a string? You can think of a string as a word or a sentence enclosed by double
quotations. Hello
Solution February 28, 2008 Name _
ECE264 Advanced C Programming Exam 1
Solve the following problems. The number of points for each problem is shown next to the problem and in the table below. The outcomes corresponding to each question are also sho
ECE264 Spring 2008 Homework 7 Due Thu, Mar 20, 11pm In a ternary tree, each node has at most three children, referred to as the left, middle and right child of the node. The sorting rules for a All the elements in the the node. All the elements in th
SOLUTION
April 17, 2008 Name _
ECE264 Advanced C Programming Exam 3
Solve the following problems. The number of points for each problem is shown next to the problem and in the table below. The outcomes corresponding to each question are also shown.
ECE 264 Exam 1
06:30-7:30PM, October 5, 2011
EE170
In signing this statement, I certify that I will not receive aid from nor provide aid to any
other student for this exam. I understand that if I fail to honor this agreement, I will
receive a failing grad
ECE 264 Exam 2
06:30-7:30PM, November 15, 2011
EE170
In signing this statement, I certify that I will not receive aid from nor provide aid to any
other student for this exam. I understand that if I fail to honor this agreement, I will
receive a failing gr
ECE 264 Advanced C Programming
If you want to try the code in the handout (PDF le), you do not have to type it. In Adobe
Reader, select File and Save as Text.
Earlier
version
of
the
lecture
notes
can
https:/engineering.purdue.edu/OOSD/S2010
be
obtained
fr
ECE 264 Advanced C Programming
Contents
1 Recursion and Call Stack
1
2 Divide and Conquer
2
3 Mind Guessing Game
4
4 Binary Search
5
5 Factorial
8
6 Fibonacci Numbers
8
7 Towers of Hanoi
10
8 Recursion versus Iteration
12
8.1
Time Complexity and Space Com
ECE 264 Advanced C Programming
Contents
1
File Types
1
2
scanf, fscanf, printf, and fprintf
3
3
stderr
4
4
Other File Operations for I/O
5
5
Other Useful File Operations
9
1
File Types
Most of our programs, up to this point, do the same things over and ov
ECE 264 Fall 2015
Exam 1, September 24, 2015
In signing this statement, I hereby certify that the work on this exam is my own and
that I have not copied the work of any other student while completing it. I understand
that if I fail to honor this agreement