Typedef

#import <Foundation/Foundation.h>


typedef struct  {
    char name;
    int bookid;
    int pages;
}books;

typedef char naresh;

int main(int argc, const char * argv[]) {
    books book;
    naresh i='a';
    book.name ='p';
    book.bookid=12;
    book.pages=120;
    NSLog(@"book name=%c,bookid=%d,pages=%i",book.name,book.bookid,book.pages);
    NSLog(@"%c",i);
    
    return 0;

}
Previous
Next Post »