1_Objective-C Introduction

Objective-C is a general-purpose language Developed on top of C Programming language by adding features of Small Talk programming language making it an object-oriented language.

Note : Objective-C the main programming language used by Apple

Initially, Objective-C was developed by NeXT for its NeXTSTEP OS from whom it was taken over by Apple for its iOS and Mac OS X.

Basic Syntax

#import <Foundation/Foundation.h>
int main ()
           /* and terminate with the characters */
          return 0;

  • #import <Foundation/Foundation.h> Is a preprocessor command .
  • int main () {} The main function where program execution begins.
  • return 0; Terminates main()function and returns the value 0.

Later we will study about Preprocessor command and Function

Semicolons ;

  • The semicolon is a statement terminator.
  • That is, each individual statement must be ended with a semicolon. It indicates the end of one logical entity.


  • Comments are like helping text in your Objective-C program
  • They are ignored by the compiler.
  • They start with /* and terminate with the characters */

Whitespace in Objective-C

A line containing only whitespace, possibly with a comment, is known as a blank line, and an Objective-C compiler totally ignores it.

Whitespace is the term used in Objective-C to describe

  • blanks
  • tabs
  • newline
  • characters
  • comments.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s