{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CS2_42_C_Part1 - CS2 Module 42 Category Elements of C Topic...

Info icon This preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon
CS2 Module 42 Category: Elements of C Topic: Part I Objectives History Flow (Compile/Link/Execute) Differences viv a vis Java I/O Functions
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
CS 2 Introduction to Object Oriented Programming Module 42 Elements of C Programming Part 1
Image of page 2
CS2 Introduction to Object Oriented Programming C (Let’s do it all again in C) (Let’s do it all again in C)
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Agenda Caution - it will be hard to distinguish in this discussion between what the C language allows you to do, and what good practice suggests that you do... Motivation C history C compilation (unix) C syntax variables procedures simple examples Structs, typedefs A hint at pointers
Image of page 4
Motivation Future CS courses will require you to write in C 2130, 2200 3000 level, 4000 level, 6000 level, 8000 level... C is so powerful and so old that no matter what your major you may run into tools, equipment, techniques that require writing/modifying/understanding some C code
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Motivation Different computer languages are not like different flavors of ice cream. They don't just do the same thing with different syntax Some languages like Scheme and Lisp attempt to completely divorce the programmer of any knowledge of the actual hardware running the program. Other languages are more closely tied to the hardware. C is very close to the hardware and some programs require knowledge of how the computer actually works internally.
Image of page 6
Motivation When you see some of the challenges of C, you might appreciate more how much Java really does for you: avoiding pointer badness managing memory compile time type checking second generation string management (toString())
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
plus... My name is xxxx, and you were my JAVA professor a year ago. I am an EE major (power engineering), and I am working on some projects now, for which I will most likely need to write some programs in C. Since I never had any C in my life, I was wondering if you can recommend a book for someone like me for C for self-teaching. I assume that C and JAVA have some similarities, so it will not be that difficult, since I was OK in JAVA...
Image of page 8
C
Image of page 9

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Then Why C? The language is ubiquitous. C is “fast” relative to interpreted languages. C is "fast" compared with any language that has a lot of built-in overhead to keep you out of trouble It’s available on almost every platform, and with recent standards, it’s become possible to write (fairly) portable code. In fact, C is the lowest level language where some portability can be assured across architectures (platforms). I.e. it’s the lowest level high level language…
Image of page 10
History (Short Version) C was originally created as a language with which one could write operating systems. (like Unix). It was created in the 70's: Computers were much slower.
Image of page 11

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern