Final Exam Discussion Janani Kalyanam

gradebook.c ● Each field may need an single or multidimensional array. (may need additional arrays as well).

● Alternatively, could store the current version of the database in a file. Can re-write the file whenever necessary.

gradebook.c ● Adding a record: ○ must change all the fields simultaneously if using arrays to store database ○ must read from, and write to the same file if using file to store database

● Deleting a record: ○ must delete all the fields simultaneously, and fill in the cleared space by "scootching" if using arrays (must be careful with indexing) ○ must read from, and write to the same file if using file to store database

gradebook.c ● Keyword search: ○ string.h has strcmp function that compares 2 strings. Example: strcmp("apples","oranges") returns -1; strcmp("oranges","apples") returns +1 strcmp("apples","apples") returns 0 stricmp() and strcasecmp() for case-insensitive comparisons. stricmp("apples",AppLES") will return 0

gradebook.c ● keyword search (contd.): ○ Must read user input as string. ○ atoi() in the standard library will be useful. ■ converts string to integer. ●

Reporting statistics: ○ Use formula to calculate final number. ○ Histograms (use arrays)



Some constants ○ 511 ○ 16

similarity ● similarity between two files ● word-frequency table "Tarantino spent a decade writing the script for this film. Tarantino viewed the script as his masterpiece in the making, so he wanted it to be his best ever. According to Tarantino, all his films make the audience laugh at things that are not funny."

similarity ● Need multi dimensional arrays to store words

● word is defined as a sequence of chars separated by a space or newline

similarity sqrt(4*4 + 2*2 + 3*3 + 2*2 + 1*1 + 1*1) * ... 2010

4

2010

6

my

2

my

2

his

3

his

4

the

2

the

1

Brad

1

Angelina

1

Pitt

1

Jolie

1

similarity ● (4*6) + (2*2) + (3*4) + (2*1) = numerator common words

# occurrances in file1

# occurrances in file 2

2010

4

6

the

2

2

my

3

4

his

2

1

Final Exam Discussion

of the database in a file. Can re-write the file whenever ... to store database. ○ Deleting a record: ○ must delete all the fields simultaneously, and fill in the cleared space by "scootching" if using arrays. (must be careful with indexing). ○ must read from, and write to the same ... converts string to integer. ○ Reporting statistics:.

66KB Sizes 1 Downloads 296 Views

Recommend Documents

Midterm and Final Discussion Questions
Midterm and Final Discussion Questions. Unit I Discussion Questions. 1. Cartography is not simply a technical exercise in penmanship and coloring, nor are decision confined to scale and projection. Mapping is a politically sensitive undertaking. Look

Final Exam Solution - nanoHUB
obtain an expression for the conductance per unit width at T=0K, as a function of the ... Starting from the law of equilibrium, what is the average number of electrons ... is identical to contact 1, except that it is magnetized along +x instead of +z

Final Exam
Dec 11, 2012 - For Project Assignment 4, the vast majority of the class did not fully describe why or why not their ... credit response on Project Assignment 4.

Final Exam Solution - nanoHUB
SOLUTION. PUID # : Please show all work and ... later in the course starting from a (1x1) Hamiltonian and contact self-energies. [H]=[e] [X]=-i [/1/2] , [X2]=-i [/2/2].

sample final exam
What is a network explanation for the often-noticed phenomenon of the experience curve? 4. Discuss Uzzi's view of embeddedness. What are the arguments he ...

Marijuana Vaping Panel Discussion flyer FINAL 9.19.16.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Marijuana ...

final exam study guide.pdf
B. Pastoralism developed at various sites in the grasslands of Afro- Eurasia. C. Different crops or animals were domesticated in the various core. regions ...

FINAL ANSWERKEY 5|l - SEB Exam
Dec 21, 2016 - 6. 5FJFU-4 lUZGFZ4 lCDF,I4VFZF;]Z v VF XaNMGM ;\7FGF SIF 5|SFZDF\ ;DFJ[X ... (A) 5}6" lJZFD (B) pNUFZ lRî (C) V

Fall 2017 - Final Exam Schedule.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Fall 2017 - Final ...

INTRODUCTION TO ROBOTICS final exam REVIEW SHEET.pdf ...
... Data. Programming to accumulate and react through the use of variables. Page 1 of 1. INTRODUCTION TO ROBOTICS final exam REVIEW SHEET.pdf.

Final Exam Practice Questions Workings.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Final Exam ...

Math 114-Review Final Exam
The equation that models its height, h feet, off the ground t seconds after it was fired is h = - 16t2 + 40t. (a) How high is the rocket 1.5 seconds after it was fired?

Final Exam schedule_2015.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Final Exam ...

OLC Final Exam REVIEW.pdf
3. The Summary. 4. The Information Text. Page 1 of 1. OLC Final Exam REVIEW.pdf. OLC Final Exam REVIEW.pdf. Open. Extract. Open with. Sign In. Main menu.

FINAL ANSWERKEY 5|l - SEB Exam
Dec 21, 2016 - 6. 5FJFU-4 lUZGFZ4 lCDF,I4VFZF;]Z v VF XaNMGM ;\7FGF SIF 5|SFZDF\ ;DFJ[X ... (A) 5}6" lJZFD (B) pNUFZ lRî (C) V

Final Exam Fall 2010 Solutions.pdf
Sign in. Loading… Whoops! There was a problem loading more pages. Whoops! There was a problem previewing this document. Retrying... Download. Connect ...Missing:

Spring 2017 - Final Exam Schedule.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Spring 2017 ...

Final Exam Schedule 2016.pdf
02/12/2016 (Friday) 103 Pr (3:00-5:00 pm) DN, OPS. 05/12/2016 (Monday) 104 Th DC. 6/12/2016 (Tuesday) 104 Pr DC. 8/12/2016 (Thursday) 105 Th SP, AKS, ...

2016SP Final Exam Schedule.pdf
Crisis Communications 10 Friday 1 EM‐4222‐21 Cadwalader HA 201. Operational ... Legislative Compliance 10 Friday 4 SS‐4123‐26, 27 Carroll HA 206. Legislative ... Modern Irish History 13 Monday 3 SS‐3247‐27 Ritschel HA 102.

final exam january 2013 semester -
COURSE. DATE. TIME. EBB4O23 - DATA AND COMPUTER NETWORK ... Propose the maximum link utilization for continuous flow control with a window size of ...

Final Exam 3_18.pdf
Consumer. Decomposer. Detritivore. Herbivore. Omnivore. Carnivore. Species. Population. Community. Ecosystem. Biosphere. Trophic Level. Thermodynamics.

final exam january 2013 semester -
EBB4O23 - DATA AND COMPUTER NETWORK ... Analyze the advantages of having the Frame Check Sequence ... Using your friend's computer, you.

Final Exam Review Period
(7.62 x 107) – (8.9 x 106). 12. Sam fills a water balloon with 7.8 x 10-3 ft3 of water. ... 6m – 4(m +1) = 14. 20. Three tables are given below. Decide if the table ...