iOS_Objective-C測试
2024-08-30 15:21:31
1. iOS中程序正常载入UIViewControlle时,下面四个方法哪个最先运行?
A.viewVillAppear
B.viewDidLoad
C.viewDidAppear
D.viewWillDisappear2. 类方法用什么符号标识?
A.+
B.-
C.static
D.*3. iOS中以下哪个方法不能自己手动调用?
A.dealloc
B.release
C.retain
D.new4. 以下哪个类型不能够放到NSArray中?
A.NSString
B.NSInteger
C.NSDictionary
D.NSArray5. object-c中的输出对象用哪个符号?
A.@
B.$
C.&
D.*6. protocol的方法怎样定义要求必须实现?
A.@required
B.@must
C.@optional
D.@should7. iOS中定义一个 SEL a = @selector(b),b中应该填什么?
A.方法名字
B.方法名字的字符串
C.SEL參数8. Object-c的类能够多重继承么?
A.能够
B.不能够9. float a = 4.45;
int b = 2.1;
int c = a/b;
NSLog(@"%d",c);
请问输出结果是多少
A.1
B.2
C.4
D.510. kvo属于哪种设计模式?
A.观察者模式
B.代理模式
C.单例模式
D.訪问者模式11. int a = 5;
int b = 6;
int c = a+ b++;
请问c等于多少?
A.5
B.6
C.11
D.1212. object-c,调用c++代码须要把文件后缀改成
A..mm
B..m
C..c
D..cpp13. Cocoa中有虚基类吗?
A.有
B.没有14. int a = 3;
int b = a++;
int c = ++b;
int d = a + b+ c++;
NSLog(@"%d",d);
请问输出结果是多少
A.3
B.6
C.9
D.1215. UIView * view = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 20, 40)]; view 的 宽度是多少?
A.0
B.20
C.30
D.4016. 以下哪个引入文件不会引起反复包括?
A.#import
B.#include
C.@class
D.@include17. Xcode中选择模拟器编译,在Products中生成的二进制文件后缀是以下哪个?
A..app
B..apk
C..ipa
D..lib错误应该选择:A..app
18. int a = 28;
int b = 0;
for (int i = 0; i<2; i++) {
b = a%3;
b++;
++b;
}
NSLog(@"%d",b);
请问输出结果是多少
A.1
B.2
C.3
D.2819. Object-C中与retain语义相反的方法是?
A.dealloc
B.release
C.autoRelease
D.delete20. int m = 0;
int n = m++;
m = n++;
请问m结果是多少 ?
A.0
B.1
C.2
D.3
最新文章
- Dagger2 (二) 进阶篇
- 转:C++项目中的extern ";C"; {}
- IOS managerTime
- [Config]Zabbix的Mongodb插件安装,centos
- Hibernate一些防止SQL注入的方式
- mysqldump使用方法
- 【MySQL】MySQL的group_concat使用例子
- js encodeURI方法认识
- ajax的data传参的两种方式
- 安装程序无法初始化。请下载Adobe Support Advisor检测该问题
- java.lang.ClassFormatError: Illegal UTF8 string in constant pool in class file Server/Request
- CAF(C++ actor framework)使用随笔(send sync_send)(二)
- xxx app 项目问题解决一览
- 前端MVVM框架:Knockout.JS(一)
- java获取类加载路径和项目根路径的5种方法
- UVA 10474 - Where is the Marble?--vector
- MySQL MGR+ Consul之数据库高可用方案
- optional install error: Package require os(darwin) not compatible with your platform(win32)
- .NetCore实践篇:分布式监控Zipkin持久化之殇
- [development][security][modsecurity][nginx] nginx / modsecurity development things