1、用预处理#define声明常数,以表明一年多少秒
2、写一个“标准”宏MIN,此宏输入2个参数并返回较小的一个
3、obj-c有无多重继承? 如何实现之
4、@protocol解释 作用
5、代理、通知的区别? 哪里使用代码:
1、Define a node structure for a single linke list,as saving the mode can only hold single int valueImplement the list insertion function define as void Insert(ref Node headNode,int insertValue),Assuming the list is in ascending order and it hold single int value only,where headNode points to the begining of the list,and insertValue is the int value to insert?

解决方案 »

  1.   

    #define secondY(n,m) if((n)%4 == 0 && (n)%400 == 0){(m)=(n)*364*24*3600;}\
    else if((n)%4 == 0 && (n)%400 != 0){(m)=(n)*366*24*3600;}\
    else if((n)%4 != 0){(m)=(n)*365*24*3600;};
    #import <Foundation/Foundation.h>int main (int argc, const char * argv[]) {
        NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
        long n = 2000;
        long m;
        secondY(n,m);
        
    NSLog(@"一年有:%ld 秒", m);    [pool drain];
        return 0;
    }
      

  2.   

    #define MMIN(n,m) (((n)<(m))?(n):(m))
      

  3.   

    无,单继承多协议(类似与Java的接口)
      

  4.   

    话说你这也不是外企的题,每个公司笔试objective-c 都出自那两套,中科软科也是这套题。cocoachina上有,答案也有
      

  5.   

    http://www.cocoachina.com/bbs/read.php?tid=44281&keyword=%CA%D4%CC%E2
    我滴个天呢⋯⋯
    真滴有!
      

  6.   

    Mark,可以参考参考,正学习Objective-C中
      

  7.   

    1、用预处理#define声明常数,以表明一年多少秒#define YEAR_SECOND ((365*24*60*60)UL)
      

  8.   

    推荐一篇IOS开发的好文 http://blog.csdn.net/iukey/article/details/7083165
      

  9.   

    推荐一篇IOS开发的好文 [url=http://blog.csdn.net/iukey/article/details/7083165]
      

  10.   

    推荐一篇IOS开发的好文 http://blog.csdn.net/iukey/article/details/7083165