Computer Science Large Practical:                               Quick quiz on Objective-C                                 ...
Question: Does this program print Yes, No or neither?Stephen Gilmore (School of Informatics)   Computer Science Large Prac...
Answer: it prints Yes.                                                                                   . . . it prints Y...
Question: Does this program print Yes, No or neither?Stephen Gilmore (School of Informatics)   Computer Science Large Prac...
Answer: it prints No.                                                                                    . . . it prints N...
Question: Does this program print Yes, No or neither?Stephen Gilmore (School of Informatics)   Computer Science Large Prac...
Answer: neither, it throws an exception.                                                            . . . neither, it thro...
Question: Does this program print Yes, No or neither?Stephen Gilmore (School of Informatics)   Computer Science Large Prac...
Answer: it prints No.                                                                                    . . . it prints N...
Question: Does this program print Yes, No or neither?Stephen Gilmore (School of Informatics)   Computer Science Large Prac...
Answer: it prints No, because we are using pointer equality                                  . . . it prints No, because w...
Question: Does this program print Yes, No or neither?Stephen Gilmore (School of Informatics)   Computer Science Large Prac...
Answer: it prints Yes, because we are using contentequality                                . . . it prints Yes, because we...
Question: Does this program print Yes, No or neither?Stephen Gilmore (School of Informatics)   Computer Science Large Prac...
Answer: neither, it throws an exception because we forgotto call init                 . . . neither, it throws an exceptio...
Upcoming SlideShare
Loading in …5
×

Quick quiz on Objective-C

2,550
-1

Published on

A quick quiz to point out some of the differences between Objective-C and Java.

Published in: Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,550
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
22
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Quick quiz on Objective-C

  1. 1. Computer Science Large Practical: Quick quiz on Objective-C Stephen Gilmore School of Informatics Friday 19th October, 2012Stephen Gilmore (School of Informatics) Computer Science Large Practical Friday 19th October, 2012 1 / 15
  2. 2. Question: Does this program print Yes, No or neither?Stephen Gilmore (School of Informatics) Computer Science Large Practical Friday 19th October, 2012 2 / 15
  3. 3. Answer: it prints Yes. . . . it prints Yes.Stephen Gilmore (School of Informatics) Computer Science Large Practical Friday 19th October, 2012 3 / 15
  4. 4. Question: Does this program print Yes, No or neither?Stephen Gilmore (School of Informatics) Computer Science Large Practical Friday 19th October, 2012 4 / 15
  5. 5. Answer: it prints No. . . . it prints No.Stephen Gilmore (School of Informatics) Computer Science Large Practical Friday 19th October, 2012 5 / 15
  6. 6. Question: Does this program print Yes, No or neither?Stephen Gilmore (School of Informatics) Computer Science Large Practical Friday 19th October, 2012 6 / 15
  7. 7. Answer: neither, it throws an exception. . . . neither, it throws an exception.Stephen Gilmore (School of Informatics) Computer Science Large Practical Friday 19th October, 2012 7 / 15
  8. 8. Question: Does this program print Yes, No or neither?Stephen Gilmore (School of Informatics) Computer Science Large Practical Friday 19th October, 2012 8 / 15
  9. 9. Answer: it prints No. . . . it prints No.Stephen Gilmore (School of Informatics) Computer Science Large Practical Friday 19th October, 2012 9 / 15
  10. 10. Question: Does this program print Yes, No or neither?Stephen Gilmore (School of Informatics) Computer Science Large Practical Friday 19th October, 2012 10 / 15
  11. 11. Answer: it prints No, because we are using pointer equality . . . it prints No, because we are using pointer equalityStephen Gilmore (School of Informatics) Computer Science Large Practical Friday 19th October, 2012 11 / 15
  12. 12. Question: Does this program print Yes, No or neither?Stephen Gilmore (School of Informatics) Computer Science Large Practical Friday 19th October, 2012 12 / 15
  13. 13. Answer: it prints Yes, because we are using contentequality . . . it prints Yes, because we are using content equalityStephen Gilmore (School of Informatics) Computer Science Large Practical Friday 19th October, 2012 13 / 15
  14. 14. Question: Does this program print Yes, No or neither?Stephen Gilmore (School of Informatics) Computer Science Large Practical Friday 19th October, 2012 14 / 15
  15. 15. Answer: neither, it throws an exception because we forgotto call init . . . neither, it throws an exception because we forgot to call initStephen Gilmore (School of Informatics) Computer Science Large Practical Friday 19th October, 2012 15 / 15
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×