Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Book NSSet
//gcc 5.0.4 #import <Foundation/Foundation.h> int main (int argc, const char * argv[]) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSSet *statinoryitems=[NSSet setWithObjects:@"Pen",@"Pencil",@"Book",@"Marker",nil]; NSSet *statinoryitems2=[NSSet setWithObjects:@"Pen",@"Pencil",@"Book",@"Marker",nil]; NSSet *statinoryitems3=[NSSet setWithObjects:@"Pen",@"Pencil",@"Book",@"Marker",nil]; NSSet *PurItems=[NSSet setWithObjects:@"a",@"b",@"c",@"d",nil]; NSLog (@"%@",statinoryitems); for(id items in statinoryitems) { NSLog(@"%@",items); } if([statinoryitems isEqualToSet:statinoryitems3 ]) {NSLog(@"All items is Good"); } if([statinoryitems intersectsSet:statinoryitems2 ]) {NSLog(@"All items is Awesome"); } if([statinoryitems isSubsetOfSet:statinoryitems ]) {NSLog(@"All items is Not Bad"); } if([statinoryitems containsObject:@"Book" ]) {NSLog(@"Book Mil Gaya"); } NSSet *newSet=[statinoryitems setByAddingObjectsFromSet:PurItems]; NSLog(@"%@",newSet); [pool drain]; return 0; }
run
|
edit
|
history
|
help
0
NSSet Program in objectice-c
NSString Examples in one
objective-c size of datatypes
size of datatypes in objective c
find simple Interest in objective c
NSArray Method Exercise
Obj-C_Program_Structure_1
find simple Interest in objective c
basic arithmatic Opreation in objective C
Even numbers are at the beginning and all the Odd numbers