Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8497061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:01:15+00:00 2026-06-11T00:01:15+00:00

NSLog(@%d,[annotations count]); The above code is used with an NSMutableArray named ‘annotations’. My question

  • 0
NSLog(@"%d",[annotations count]);

The above code is used with an NSMutableArray named ‘annotations’.

My question is… what does this code do exactly?

I know NSLog outputs text, and its saying annotations count.. so I am thinking that it outputs the amounts of elements in the annotations array.

Am I correct?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T00:01:17+00:00Added an answer on June 11, 2026 at 12:01 am

    You could have just run the code to test this, but yes this command outputs to NSLog the count of the array named “annotations”. For example if the array contains objects and indexes 0,1,2,3, and 4 the array’s count will be 5.

    NSArray * array = [NSArray arrayWithObjects:@"zero", @"one", @"two", @"three", @"four", nil];
    NSLog(@"Number of items in my array is: %d", [array count]);//this will return (5)
    

    For more details, see this post: Size of an NSArray

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know this is a very stupid question to ask but i have a
I have code: if (self.annotations) [self.mapView addAnnotations:self.mapView.annotations]; NSLog(@mapView: %@, anos:%@,self.mapView,self.mapView.annotations); And I get the
When I NSLog my NSMutableArray, what I get is the following { ABSNFGH True,
for(UIView *subview in [scrollView subviews]) { NSLog(@subviews Count=%d,[[scrollView subviews]count]); //[subview release]; [subview removeFromSuperview]; }
I need to display multiple annonation views in MKMapKit..I use this code.. - (void)viewDidLoad
I have a MKMapView (also a UIPopoverControllerDelegate) with Annotations. This MapView has, in the
I'm not using this for driving directions or similar. I have a few annotations
For some reason the code below is not adding annotations to the map view.
I've got a MKMapView and I'm adding annotations like this: for (NSDictionary *tmp in
I put an NSlog in my dealloc method of my view controller. It does

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.