- 1、本文档共34页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
国外大学JAVA考试题2011S2ExamAnswers
CompSci 101
THE UNIVERSITY OF AUCKLAND
SECOND SEMESTER, 2011
Campus: City
COMPUTER SCIENCE
Principles of Programming
(Time Allowed: TWO hours)
NOTE:
You must answer all questions in this test.
No calculators are permitted
Answer in the spaces provided in this booklet.
There is space at the back for answers that overflow the allotted space.
Surname
Forenames
Student ID
Login (UPI)
Q1 Q4 Q7 Q10
(/10) (/4) (/8) (/10)
Q2 Q5 Q8 Q11
(/6) (/15) (/7) (/10)
Q3 Q6 Q9 Total
(/6) (/15) (/9) /100
CONTINUED
Question/Answer Sheet - 2 - CompSci 101
ID:
Question 1 (10 marks)
a) Complete the output produced when the following code is executed.
String a = 3;
String b = 2;
int y = 5;
int z = 4;
System.out.print(1. );
System.out.println(a + b + y + z + (y + z));
1. 32549
(2 marks)
b) Complete the output produced when the following code is executed.
int a = 2;
int b = a;
a++;
b = a + b;
a = b + a;
b = a + b;
System.out.println(a: + a + b: + b);
a: 8 b: 13
您可能关注的文档
- 初中生数学题.pdf
- 初中英语专业知识考试题.doc
- 初中数学动态题.doc
- 初中计算机考试十套考查模拟题库word版.doc
- 初二上数学试题.doc
- 初二下数学重点题.pdf
- 初二下期语文期末考试试题.doc
- 初二学员入学测试---英语.pdf
- 初二数学 几何期中试题-2.doc
- 初二上期末英语复习指导20101221.ppt
- 两个相干源产生波具有3b chmc.pdf
- wifi高性能模块ce fcc rohs认证-xrf report电子档.pdf
- linux pci multiport installation manual多端口安装手册.pdf
- 二章基本概念理论.pdf
- 互联网工程任务组ietfs turnerrfc5940 txt.pdf
- mtz0数学高级证明集合关系群mathematics paper 3 sets relations and groups french.pdf
- 网上书店需求规格说明.pdf
- 系统测试用例pcweb终端.pdf
- apv1 keil环境下接口兼容问题.pdf
- 2023届江西省八所重点中学高三3月联考英语试题(原卷版).docx
文档评论(0)