# Register now to access 7 million high quality study materials (What's Course Hero?) Course Hero is the premier provider of high quality online educational resources. With millions of study documents, online tutors, digital flashcards and free courseware, Course Hero is helping students learn more efficiently and effectively. Whether you're interested in exploring new subjects or mastering key topics for your next exam, Course Hero has the tools you need to achieve your goals.

2 Pages

### H24-Characters

Course: CS 106, Fall 2009
School: Stanford
Rating:

Word Count: 594

#### Document Preview

Roberts Eric CS106A Handout #24 October 15, 1999 Enumeration Types and Characters Reading: today, Chapter 9 Monday and Wednesday, Chapter 10 The principle of enumeration The idea that it is possible to represent values like days of the week, compass directions, Boolean data, and the like just by assigning integers to the different elements is both simple and powerful. Although I expect you to know and be able to...

Register Now

#### Unformatted Document Excerpt

Coursehero >> California >> Stanford >> CS 106

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
Roberts Eric CS106A Handout #24 October 15, 1999 Enumeration Types and Characters Reading: today, Chapter 9 Monday and Wednesday, Chapter 10 The principle of enumeration The idea that it is possible to represent values like days of the week, compass directions, Boolean data, and the like just by assigning integers to the different elements is both simple and powerful. Although I expect you to know and be able to use the syntax for enumerated types, the most important things to understand are the concept of enumeration and how this principle applies to character data. Enumerated types The following examples from the text illustrate the use of enumerated types: typedef enum { Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday } weekdayT; typedef enum { January = 1, February, March, April, May, June, July, August, September, October, November, December } monthT; typedef enum { North, East, South, West } directionT; In most respects, defining an enumerated type is similar in its effect to using #define to declare names for constants. For example, you can achieve much the same effect of the directionT type by defining the following integer constants: #define #define #define #define North East South West 0 1 2 3 Enumerated types, however, have two advantages over constants. First, the type name carries information that makes programs that use them easier to read. Second, interpretive systems and other debugging tools can make use of the type information to display enumerated values by name, which simplifies debugging. Characters The most important things to remember about character data are the following: Every character on the keyboardincluding special characters such as newlineis represented inside the computer by a small integer, which is usually its ASCII code. On the other hand, you rarely to need know what the code is, only that there is one. Like any other scalar type, characters can be used in any integer context. In particular, you can use them in a for loop or switch statement. It is also useful to recognize that 2 not all calculations with characters are likely to make sense, and you should read through the list of the most common operations on page 313. The codes for the digit characters are guaranteed to be consecutive. Thus, you can always determine the numeric value of a digit by subtracting the code for the character '0'. Although it is not guaranteed to be true in all character encodings, we will make the standard assumption that the alphabetic characters are also consecutive. The uppercase characters and lowercase characters, however, are independent sequences. Beyond these basic principles, it is important for you to understand the functions in the ctype.h interface, which appears on pages 314 and 315. Strings For most of this course, you should think of the type string as a fundamental type in C, even though it is defined in genlib.h. The advant...

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Stanford - CS - 106
Eric Roberts CS106AHandout #15 October 4, 1999Notes on Control Statements in CReading: Today, Chapter 4 Wednesday, Chapter 5 Topics not covered in class The following topics from Chapter 4 are important, but will not be covered explicitly in cla
Stanford - CS - 106
Eric Roberts CS106AHandout #20 October 8, 1999CS106A Graphics ContestSubmission deadline: Wednesday, October 20 The graphics programs you can write using the tools from Chapter 7 are more exciting than some of the other programs you have seen in
Stanford - CS - 106
Eric Roberts CS106AHandout #39 November 1, 1999Assignment #5MiniSimDue: Monday, November 8 Although the MiniSim machine provides a useful model for thinking about computer architecture, it doesnt exist in the physical sense. When you use the Min
Stanford - E - 145
E145/STS173 Session 2 Silicon Valley and EntrepreneurshipProfessor Randy Komisar Stanford UniversityCopyright 2006 by the Board of Trustees of the Leland Stanford Junior University and Stanford Technology Ventures Program (STVP). This document ma
Stanford - BRKS - 1036
UNTIED STATES DISTRICT COUR T FOR THE DISTRICT OF MASSACHUSETT S' i sf~'CMARK COLLINS, Derivatively on Behalf ) Civil Action No . of Nominal Defendant BROOKS ) AUTOMATION, INC ., )_~ t} jA Plaintiff,v.I))RROBERT J . THERRIEN, A .
Stanford - CPN - 1023
Stanford - MU - 1035
IN THE UNITED STATES DISTRICT COURT FOR THE DISTRICT OF IDAHO In re MICRON TECHNOLOGIES, INC. SECURITIES LITIGATION ) 1 Case No. CV-06-85-S-BLW MEMORANDUM DECISION AND ORDER INTRODUCTION The Court has before it a motion for class certification filed
Stanford - STA - 1039
UNITED STATES DISTRICT COURT DISTRICT OF MINNESOTA SIDNEY KAHN, on behalf of himself and all others similarly situated, Plaintiff, v. THE ST. PAUL TRAVELERS COMPANIES, INC., ROBERT LIPP, JAY FISHMAN, BRUCE A BACKBERG, THOMAS A. BRADLEY, JOHN C. TREAC
Stanford - CSUN - 1038
UNITED STATES DISTRICT COURT SOUTHERN DISTRICT OF NEW YORKANTHONY GIOMBETTI and DON VANDENHEUVAL, Individually and On Behalf of All Others Similarly Situated, Plaintiffs, vs. CHINA SUNERGY CO. LTD., Defendant.x : : : : : : : : : : : xCivil Acti
Stanford - XIDE - 1034
Patrick L. Rocco (PR 8621) SHALOV STONE &amp; BONNER LLP 163 Madison Avenue, P.O. Box 1277 Morristown, New Jersey 07962-1277 Tel.: (973) 775-8997 MILBERG WEISS BERSHAD &amp; SCHULMAN LLP Steven G. Schulman Peter E. Seidman Sharon M. Lee One Pennsylvania Plaz
Stanford - QSFT - 1037
UNITED STATES DISTRICT COURT CENTRAL DISTRICT OF,CALIFORNIA PHTLLIP ENG, Derivatively On Behalf of QUEST SOFTWARE, INC.PLAINTIFF(S) v~C 4.SE NUMBERSACV06-751 DOC(RNBx )SEE ATTACHEDSUMMON S 1EPNDANT(S) .TO : THE ABOVE-NAMED DEFENDANT(S) : Y
Stanford - FHRX - 1025
Case 1:02-cv-02332-JOFDocument 68Filed 09/29/2004Page 1 of 37IN THE UNITED STATES DISTRICT COURT FOR THE NORTHERN DISTRICT OF GEORGIA ATLANTA DIVISIONIN RE FIRST HORIZON PHARMACEUTICAL CORPORATION SECURITIES LITIGATION: : : : : :CIVIL A
Stanford - JBL - 1036
UNITED STATES DISTRICT COURT SOUTHERN DISTRICT OF NEW YORK ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )STEAMSHIP TRADE ASSOCIATION/ INTERNATIONAL LONGSHOREMEN'S ASSOCIATION PENSION FUND, Individually and on Behalf of all Others Similarly Situated, Plaintiff, vs
Stanford - RAZF - 1028
UNITED STATES DISTRICT COURT DISTRICT OF MASSACHUSETTSTERRY SWACK and ROBERT COOPERSMITH, Individually and on Behalf of all Others Similarly Situated, Plaintiffs,Civil Action No. 03-10907-NMGJURY TRIAL DEMANDED v. LEHMAN BROTHERS INC., Defendan
Stanford - ELN - 1023
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15Kenneth J. Catanzarite (SBN 113570) CATANZARITE LAW CORPORATION 2331 West Lincoln Avenue Anaheim, California 92801 Tel: (714) 520-5544 Fax: (714) 520-0680 Lionel Z. Glancy, Esq. (SBN 134180) LAW OFFICES OF LIONEL
Stanford - SPW - 1030
IN THE UNITED STATES DISTRICT COUR T FOR THE WESTERN DISTRICT OP . NORTH CAROL INA CHARLOTTE DIVISION Civil Action No.: 3:04CV99 - MCK -X IN RE SPX CORP. SECURITIES LITIGATION :This Document Relates to :CONSOLIDATED AMENDE D COMPLAINT FOR VIOLATIO
Stanford - GTE - 1036
UNITED STATES DISTRICT COUItr SOUTHERN DISTRICT OF FLORIDA MIAMI DIVISIO N RICHARD STEVENS, on behalf of himself and all others similarly situated , Plaintiff,V. TR JUDGE MAGIS T R , F rLIR.NO'CIV-ALTONAG AGLOBETEL COMMUNICATIONS CORP ., TIMOTHY
Stanford - CNST - 1028
Case 2:03-cv-05020-ELDocument 58Filed 06/18/2004Page 1 of 63UNITED STATES DISTRICT COURT EASTERN DISTRICT OF PENNSYLVANIA IN RE CONSTAR INTL INC. SECURITIES LITIGATION ) ) ) This Document Relates To: ) ) ALL ACTIONS. ) ) __ ) Master File No.
Stanford - USITQ - 1017
\$1-13 -*UNITED STATES DISTRICT COURT EASTERN DISTRICTOF PENNSYLVANIA0No.Lihong Behalf Zhang, on of Himself and All Others Situated, Similarly Plaintiff vs STEPHEN T. ZARILLI,ERICPULIERand JOHN D. SHULMAN, Defendants) )Civil Action CL
Stanford - CRRR - 1024
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28Daniel A. Grout (SBN 168282) GROUT LAW FIRM 409 13th Street, 17th Floor Oakland, California 94612 Telephone: (510) 832-0300 Facsimile: (510) 832-0304 Attorneys for Plaintiff
Stanford - CAPR - 1026
Case 2:02-cv-03042-JCL-MFDocument 48Filed 07/15/2004Page 1 of 6UNITED STATES DISTRICT COURT DISTRICT OF NEW JERSEY CLOSED _ IN RE: CAPRIUS, INC. : Consolidated Actions: DERIVATIVE ACTION LITIGATION : __ : Civil Action No. 02-3042 (JCL) EUGENE
UNITED STATES DISTRICT COURT DISTRICT OF NEW JERSEY _ ) MERLIN JEWELL, Individually and On Behalf of ) All Others Similarly Situated, ) CIVIL ACTION NO. ) Plaintiff, ) ) vs. ) CLASS ACTION COMPLAINT ) AUDIBLE, INC., DONALD R. KATZ and ) ANDREW P. KAP
Stanford - CAPR - 1026
Case 2:02-cv-03042-JCL-MFDocument 41Filed 05/04/2004Page 1 of 26UNITED STATES DISTRICT COURT DISTRICT OF NEW JERSEY _ IN RE: CAPRIUS, INC. DERIVATIVE ACTION LITIGATION _ EUGENE SCHWARTZ and DALLAS R. WILLIAMS,: : : : : : Plaintiffs, : vs. :
Stanford - GTE - 1036
UNITED STATES DISTRICT COURT SOUTHERN DISTRICT OF FLORIDA MIAMI DIVISION CASE NO. 06-21071 -CIV-ALTONAGA/Turnoff RICHARD STEVENS, on behalf of himself and all others similarly situated, Plaintiffs, vs. GLOBETEL COMMUNICATIONS CORP., et al., Defendant
Stanford - NKE - 1017
1 2 3 4 5 6 7 8 9LAW OFFICES OF JUSTINE FISCHER JUSTINE FISCHER, OSB #81224 400 Director Building 808 S.W. Third Avenue Portland, OR 97204 Telephone: 503/222-4326 503/222-6567 (fax) MILBERG WEISS BERSHAD HYNES &amp; LERACH LLP WILLIAM S. LERACH DARREN
Stanford - AATK - 1010
UNITED STATES DISTRICT COURT EASTERN DISTRICT OF NEW YORK- XRACHEL BLASS, YURI GURARITY, SOL GINGOLD, DON NAGY , MARILYN LESSER-GALE, JOHN GUIDA, Case No . 99 Civ . 5738 (FB )CLASS ACTION AMENDED COMPLAINTPlaintiffs , -against-CAPITAL INTERNAT
Stanford - TYC - 1037
0Peter D. Morgenstern (PM-51t21 } t iregory A. Blue (GB-9569) Kale We)ber-Pi(cock IKP-9576) HR. GA14 WEXI FR I;A LL &amp; IvIORUHNS1'ERN, LL.P 885 Third Avenue, Suite 3040:11bNew York, NY 1002? (212) 308-5858 I ax: (212) 486-0462 UNH ED STATES DIS
Stanford - AGA - 1018
EXHIBIT ASECURITIES AND EXCHANGE COMMISSION WASHINGTON, D.C. 20549 SCHEDULE 14A INFORMATION PROXY STATEMENT PURSUANT TO SECTION 14(A) OF THE SECURITIES EXCHANGE ACT OF 1934 Filed Filed Check [ [ 1 ] by by the the Registrant a Party other appropriat
Stanford - WITS - 1036
FILE IN CLER9^S O CE Atlanta.S.D.CM k 31 2008IN THE UNITED STATES DISTRICT COURT FOR THE NORTHERN DISTRICT OF GEORGIA ATLANTA DIVISION4C^rkBy:IN RE WITNESS SYSTEMS, INC. SECURITIES LITIGATIONCivil Action No. 1:06-CV-1894ORDER This matter
Stanford - GTE - 1036
Case 1:06-cv-21071-CMADocument 32-1Entered on FLSD Docket 10/30/2006Page 1 of 61UNITED STATES DISTRICT COURT SOUTHERN DISTRICT OF FLORIDA MIAMI DIVISION Case No. 06-21071-CIV-ALTONAGA/Turnoff RICHARD STEVENS, et al., on behalf of themselves a
Stanford - BIOCHEM - 230
letters to nature24. Culling, J. F. &amp; Summereld, Q. Measurements of the binaural temporal window using a detection task. J. Acoust. Soc. Am. 103, 35403553 (1998).Acknowledgements We thank C. Rasmussen for the algorithm Minimize. This work was supp