import <Foundation/Foundation.h>
int main(int argc, const char * argv[]) {
@autoreleasepool {
NSMutableArray *array =[NSMutableArray arrayWithObjects:@"Bill",@"Ben",@"Chris",@"Melissa",nil];
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF beginswith[c] 'C'"];
//SELF contains[c] 'C'
NSArray *arrayB = [array filteredArrayUsingPredicate:predicate];
//NSLog(@"%ud",[arrayB count]);
for (int i=0;i<arrayB.count;i++){
NSLog(@"%@",[arrayB objectAtIndex:i]);
}
// insert code here...
NSLog(@"Hello, World!");
}
return 0;
}