Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What does __ block do?



What does __ block do?..

Answer / Neeraj Nikhra

__block is a keyword in Objective-C that allows a variable to be modified within a block. Here's an example:n```objcn__block int myVariable = 0;n-(void)myMethod {n NSBlockOperation *operation = [[NSBlockOperation alloc] init] {n myVariable++;n NSLog(@"Current value of myVariable: %d", myVariable);n };n [operation start];n}n``

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Objective-C Interview Questions

What are static attributes?

1 Answers  


What are the rules for identifiers?

1 Answers  


What is an objective statement?

1 Answers  


What is umbrella header?

1 Answers  


What is a category extension?

1 Answers  


What is posing in objective c?

1 Answers  


What is nonatomic in objective c?

1 Answers  


Explain immutable types in objective c programming language?

1 Answers  


Can I write some c++ function in same .m file? Will it compile? If no, what changes should I do to compile it?

1 Answers  


What is a class property?

1 Answers  


Is python static or dynamic?

1 Answers  


How to create uibutton programmatically in objective c?

1 Answers  


Categories