Quick quiz on Objective-C
-
Upload
stephen-gilmore -
Category
Education
-
view
1.799 -
download
4
description
Transcript of Quick quiz on Objective-C
![Page 1: Quick quiz on Objective-C](https://reader035.fdocuments.us/reader035/viewer/2022062510/549d1da6ac7959a62a8b4877/html5/thumbnails/1.jpg)
Computer Science Large Practical:
Quick quiz on Objective-C
Stephen Gilmore
School of Informatics
Friday 19th October, 2012
Stephen Gilmore (School of Informatics) Computer Science Large Practical Friday 19th October, 2012 1 / 15
![Page 2: Quick quiz on Objective-C](https://reader035.fdocuments.us/reader035/viewer/2022062510/549d1da6ac7959a62a8b4877/html5/thumbnails/2.jpg)
Question: Does this program print Yes, No or neither?
shot 2012-10-19 at 09.47.10.png
Stephen Gilmore (School of Informatics) Computer Science Large Practical Friday 19th October, 2012 2 / 15
![Page 3: Quick quiz on Objective-C](https://reader035.fdocuments.us/reader035/viewer/2022062510/549d1da6ac7959a62a8b4877/html5/thumbnails/3.jpg)
Answer: it prints Yes.
shot 2012-10-19 at 09.47.10.png
. . . it prints Yes.
Stephen Gilmore (School of Informatics) Computer Science Large Practical Friday 19th October, 2012 3 / 15
![Page 4: Quick quiz on Objective-C](https://reader035.fdocuments.us/reader035/viewer/2022062510/549d1da6ac7959a62a8b4877/html5/thumbnails/4.jpg)
Question: Does this program print Yes, No or neither?
shot 2012-10-19 at 09.48.50.png
Stephen Gilmore (School of Informatics) Computer Science Large Practical Friday 19th October, 2012 4 / 15
![Page 5: Quick quiz on Objective-C](https://reader035.fdocuments.us/reader035/viewer/2022062510/549d1da6ac7959a62a8b4877/html5/thumbnails/5.jpg)
Answer: it prints No.
shot 2012-10-19 at 09.48.50.png
. . . it prints No.
Stephen Gilmore (School of Informatics) Computer Science Large Practical Friday 19th October, 2012 5 / 15
![Page 6: Quick quiz on Objective-C](https://reader035.fdocuments.us/reader035/viewer/2022062510/549d1da6ac7959a62a8b4877/html5/thumbnails/6.jpg)
Question: Does this program print Yes, No or neither?
shot 2012-10-19 at 09.49.52.png
Stephen Gilmore (School of Informatics) Computer Science Large Practical Friday 19th October, 2012 6 / 15
![Page 7: Quick quiz on Objective-C](https://reader035.fdocuments.us/reader035/viewer/2022062510/549d1da6ac7959a62a8b4877/html5/thumbnails/7.jpg)
Answer: neither, it throws an exception.
shot 2012-10-19 at 09.49.52.png
. . . neither, it throws an exception.
Stephen Gilmore (School of Informatics) Computer Science Large Practical Friday 19th October, 2012 7 / 15
![Page 8: Quick quiz on Objective-C](https://reader035.fdocuments.us/reader035/viewer/2022062510/549d1da6ac7959a62a8b4877/html5/thumbnails/8.jpg)
Question: Does this program print Yes, No or neither?
shot 2012-10-19 at 09.50.17.png
Stephen Gilmore (School of Informatics) Computer Science Large Practical Friday 19th October, 2012 8 / 15
![Page 9: Quick quiz on Objective-C](https://reader035.fdocuments.us/reader035/viewer/2022062510/549d1da6ac7959a62a8b4877/html5/thumbnails/9.jpg)
Answer: it prints No.
shot 2012-10-19 at 09.50.17.png
. . . it prints No.
Stephen Gilmore (School of Informatics) Computer Science Large Practical Friday 19th October, 2012 9 / 15
![Page 10: Quick quiz on Objective-C](https://reader035.fdocuments.us/reader035/viewer/2022062510/549d1da6ac7959a62a8b4877/html5/thumbnails/10.jpg)
Question: Does this program print Yes, No or neither?
shot 2012-10-19 at 10.23.38.png
Stephen Gilmore (School of Informatics) Computer Science Large Practical Friday 19th October, 2012 10 / 15
![Page 11: Quick quiz on Objective-C](https://reader035.fdocuments.us/reader035/viewer/2022062510/549d1da6ac7959a62a8b4877/html5/thumbnails/11.jpg)
Answer: it prints No, because we are using pointer equality
shot 2012-10-19 at 10.23.38.png
. . . it prints No, because we are using pointer equality
Stephen Gilmore (School of Informatics) Computer Science Large Practical Friday 19th October, 2012 11 / 15
![Page 12: Quick quiz on Objective-C](https://reader035.fdocuments.us/reader035/viewer/2022062510/549d1da6ac7959a62a8b4877/html5/thumbnails/12.jpg)
Question: Does this program print Yes, No or neither?
shot 2012-10-19 at 10.24.29.png
Stephen Gilmore (School of Informatics) Computer Science Large Practical Friday 19th October, 2012 12 / 15
![Page 13: Quick quiz on Objective-C](https://reader035.fdocuments.us/reader035/viewer/2022062510/549d1da6ac7959a62a8b4877/html5/thumbnails/13.jpg)
Answer: it prints Yes, because we are using contentequality
shot 2012-10-19 at 10.24.29.png
. . . it prints Yes, because we are using content equality
Stephen Gilmore (School of Informatics) Computer Science Large Practical Friday 19th October, 2012 13 / 15
![Page 14: Quick quiz on Objective-C](https://reader035.fdocuments.us/reader035/viewer/2022062510/549d1da6ac7959a62a8b4877/html5/thumbnails/14.jpg)
Question: Does this program print Yes, No or neither?
shot 2012-10-19 at 10.41.28.png
Stephen Gilmore (School of Informatics) Computer Science Large Practical Friday 19th October, 2012 14 / 15
![Page 15: Quick quiz on Objective-C](https://reader035.fdocuments.us/reader035/viewer/2022062510/549d1da6ac7959a62a8b4877/html5/thumbnails/15.jpg)
Answer: neither, it throws an exception because we forgotto call init
shot 2012-10-19 at 10.41.28.png
. . . neither, it throws an exception because we forgot to call init
Stephen Gilmore (School of Informatics) Computer Science Large Practical Friday 19th October, 2012 15 / 15