Class Notes (996,807)
US (388,682)
Santa Clara (877)
CSCI (23)
CSCI 10 (18)
Bannister (16)
Lecture 14

CSCI 10 Lecture 14: CSCI 10 – Day 14
Premium

2 Pages
63 Views
Fall 2016

Department
Computer Science
Course Code
CSCI 10
Professor
Bannister
Lecture
14

This preview shows half of the first page. Sign up to view the full 2 pages of the document.
CSCI 10 Day 13
GRACE HOPPER AND C-STRINGS
Announcements
LECTURE
Arrays recap
When youre trying to understand things, its better to use int as data type
and change later when necessary
Array functions always have to take in the array variable and its size
variable
*Find the max value/general algorithm for finding an element in an
array:
int argmax(int A[], int sz, int& max_value) {
int max_index = 0;
max_value = A[max_index];
for (int i = 1; i < sz; i++) {
if (A[i] > max_value) {
max_index = i;
max_value = A[i];
}
}
return max_index;
}
Grace Hopper and Early Computer Scientists
Grace Hopper (1906-1992)
BS Math/Physics, PhD Math
Enlisted in the Navy during WW2, rising to Rear Admiral
Involved in military computing research
Created the first compiler (a special program) programming and
compiling on the same computer
Popularized machine-independent PL
Helped create COBOL: first high level PL
ASCII
ASCII is a code for representing English characters as numbers, with each
letter assigned a number from 0 to 127. For example, the ASCII code
for uppercase M is 77. Most computers use ASCII codes to represent text,
which makes it possible to transfer datafrom one computer to another.
See chart for conversion
C-Srings
C-strings are null-terminated (marked by \0) arrays of ASCII characters
A = {H, e, l, l, o, \0}
find more resources at oneclass.com
find more resources at oneclass.com

Loved by over 2.2 million students

Over 90% improved by at least one letter grade.

Leah — University of Toronto

OneClass has been such a huge help in my studies at UofT especially since I am a transfer student. OneClass is the study buddy I never had before and definitely gives me the extra push to get from a B to an A!

Leah — University of Toronto
Saarim — University of Michigan

Balancing social life With academics can be difficult, that is why I'm so glad that OneClass is out there where I can find the top notes for all of my classes. Now I can be the all-star student I want to be.

Saarim — University of Michigan
Jenna — University of Wisconsin

As a college student living on a college budget, I love how easy it is to earn gift cards just by submitting my notes.

Jenna — University of Wisconsin
Anne — University of California

OneClass has allowed me to catch up with my most difficult course! #lifesaver

Anne — University of California
Description
find more resources at oneclass.com CSCI 10 – Day 13 GRACE HOPPER AND C-STRINGS Announcements LECTURE Arrays recap  When you▯re trying to understand things, it▯s better to use int as data type and change later when necessary  Array functions always have to take in the array variable and its size variable *Find the max value/general algorithm for finding an element in an array: int argmax(int A[], int sz, int& max_value) { int max_index = 0; max_value = A[max_index]; for (int i = 1; i < sz; i++) { if (A[i] > max_value) { max_index = i; max_value = A[i]; } } return max_index; } Grace Hopper and Early Computer Scientists Grace Hopper (1906-1992)  BS Math/Physics, PhD Math  Enlisted in the Navy during WW2, rising to Rear Admiral  Involved in military computing research  Created the first compiler (a special program) – programming and compiling on the same computer  Popul
More Less
Unlock Document
Start your 2 week free trial

Only half of the first page are available for preview. Some parts have been intentionally blurred.

Unlock Document
Start your 2 week free trial
You're Reading a Preview

Unlock to view full version

Unlock Document
Start your 2 week free trial

Share with your friends

Get 2 friends to sign-up for a free trial as well, and get an additional free week

Next

You've reached the limit of 4 previews this month

Create an account for unlimited previews.

Already have an account?

Log In


OR

Don't have an account?

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


OR

By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.


Submit