110 likes | 114 Vues
CSC 253. Lecture 2. Some differences between Java and C. C vs. Java. Why are OSs written in C? Two steps in the Java compile-run sequence are “skipped” with C. What two steps? What’s the advantage of skipping them? What’s “bad” about skipping them?. Pointers. Advantages? Disadvantages?.
E N D
CSC 253 Lecture 2
C vs. Java • Why are OSs written in C? • Two steps in the Java compile-run sequence are “skipped” with C. • What two steps? • What’s the advantage of skipping them? • What’s “bad” about skipping them?
Pointers • Advantages? • Disadvantages?
Variables used by > 1 function • Should they be … • Global? • … • How can such a value be passed into a function? • How can such a value be returned from the function?
Let’s write a program to … • determine the value of INT_MAX; • that is, show an integer i that prints as positive, whereas i+1 prints as negative.
Let’s write a program to • look at the bits in INT_MAX and see how it’s represented in our computer.