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 5957129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:21:24+00:00 2026-05-22T18:21:24+00:00

I’m fairly new to C and Objective-C, having been taught Python beforehand. As such,

  • 0

I’m fairly new to C and Objective-C, having been taught Python beforehand. As such, there are things about the C family that boggle my mind. I’ve looked around the web, gotten books, and browsed the forums here, but some things are still bugging me…

  1. I understand variables vs. pointers in theory (one returns a value, and the other returns the address of the value in the system.) What I don’t understand is when it’s appropriate to use one over the other. Any advice?

  2. When declaring a class, what is a property? It seems like properties and class variables are identical, yet I know there must be some critical difference.

@interface testViewController : UIViewController {

    IBOutlet UILabel *label;
    IBOutlet UIImageView *uiImageView;
 }

 @property (nonatomic, retain) IBOutlet UILable *label;

 @property (nonatomic, retain) IBOutlet UIImageView *uiImageView;

 @end

If possible, although unlikely, could you answer with a comparison to Python? I know Objective-C and Python are night and day, but whatever you can think of would be great.

The books I got were from Apress: Learn C on the Mac, Learn Objective-C on the Mac, and iPhone and iPad Apps for Absolute Beginners.

I really do appreciate any help!

  • 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-05-22T18:21:25+00:00Added an answer on May 22, 2026 at 6:21 pm
    1. I understand variables vs. pointers in theory (one returns a value, and the other returns the address of the value in the system.) What I don’t understand is when it’s appropriate to use one over the other. Any advice?

    Unlike Java, Python and .NET where all variables are “pointers to objects” that can be passed around, in C things can exist in two places.

    In the program code (variable appears when code is hit, disappears when function returns). Like this:

    int my_arr[3];
    

    or, on the “heap” which is memory not a part of the program which is requested dynamically like this:

    int *my_arr_pointer = malloc(sizeof(int) * 3);
    

    The second example is close to how Java, Python and .NET pass things around. However when you use malloc() to get memory, you need to use free() on it later…or your program sucks up and wastes the computers memory. So use technique to ensure you use a consistent amount of memory. Use the second to write a more flexible application. C doesn’t have memory management which is why the first approach makes a faster, easy to debug program… that requires copying things between functions compared to the second approach where it’s easier to have a flexible sized array where the program grows and shrinks in size… but it’s slightly more complex to write. Use what is appropriate.

    3 .When declaring a class, what is a property? It seems like properties and class variables are identical, yet I know there must be some critical difference.

    Properties are wrappers to class variables. A “setter” and a “getter”. This allows you to:

    a) use a breakpoint to find out where in your code that variable is being set.

    b) to check security, or permissions, or to validate the value being set.

    c) A property doesn’t have to tie to a variable. It can create an “illusion” of it, when the data is dynamically generated. e.g a size property might count the letters in the string when you ask for it, rather than storing it.

    d) more flexibility to change the class later without having change everything accessing that property.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I am reading a book about Javascript and jQuery and using one of the
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
We're building an app, our first using Rails 3, and we're having to build

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.