CFanatic

Go Back   CFanatic > Tutorials > C Tutorials

Join CFanatic Forum Now

Introduction to C Programming topic posted under C Tutorials which is a part of Tutorials category in CFanatic Forum
Reply
 
Thread Tools Display Modes
  #1  
Old 06-08-2011, 07:06 AM
lionaneesh's Avatar
Member
 
Join Date: May 2011
Location: /root/india
Posts: 55
Thanks: 0
Thanked 11 Times in 8 Posts
lionaneesh is on a distinguished road
Send a message via Yahoo to lionaneesh Send a message via Skype™ to lionaneesh
| More
Talking Introduction to C Programming

What is C ?


C Programming Language was developed at AT & T’s Bell Labs in 1972. It was designed and developed by Denis Ritchie. Spite of C being an old language it still has remained one of the worlds most popular and one of the best programming language even came into existence!

C is basically called a Middle Level language, since it was developed to have good programming efficiency as well as good machine efficiency! Most of the people today prefer to make their applications in higher level languages like Python, Perl, etc! But these languages itself are somewhat related to C in one way or the other! Eg : Languages like Python , PHP are made in C!

People often ask me so as why they should care to learn C and understand it! The answer to this question is C is a language with a powerful code base and some strict rules! It provides a programmer the right niche to get kick started into programming with a strong background!

Getting Started?


To get started in C we have to get :-
  1. A Compiler
  2. A Text Editor (notepad or Vim will work)
A compiler is a program which goes through our code, Checks for errors and converts it in a Lower Level Language that the Computer can understand (opcodes). There are many Free compilers out there and you can choose any of them! Just make sure your compiler should support ANSI C standard functions!

I don’t want to directly just jump into coding but lets just see a glimpse of a basic C Code!

Code:
#include<stdio.h>

Int main()
{
   return(0);
}
Let’s walk through the code now:-
  1. “#include” is a preprocessor directive it stands for inclusion of a file before compilation!
  2. “Int main()” This tells the compiler that there is a function called main . Main is the function that is include in almost every useful C program! Int is the data type of the value it will return! (Note : This may seem confusing at first site but all things will be cleared as we move forward)
  3. { } The curly braces signal the start and the end of a function or a block!
  4. “return(0);” returns the value to the Operating System , Mostly 0 signals successful execution and rest numbers have their own error codes!
That’s all for this article, Stay tuned for more!!

Last edited by lionaneesh; 07-01-2011 at 10:04 AM.
Reply With Quote
The Following 3 Users Say Thank You to lionaneesh For This Useful Post:
crome (06-13-2011), jam143 (07-01-2011), kaizero (07-28-2011)
  #2  
Old 06-08-2011, 11:48 PM
lionaneesh's Avatar
Member
 
Join Date: May 2011
Location: /root/india
Posts: 55
Thanks: 0
Thanked 11 Times in 8 Posts
lionaneesh is on a distinguished road
Send a message via Yahoo to lionaneesh Send a message via Skype™ to lionaneesh
| More
Re: Introduction to C Programming

Hey Guyz! This is my first tutorial on this site! Please let me know whether you like it or not!
Reply With Quote
The Following 2 Users Say Thank You to lionaneesh For This Useful Post:
crome (06-13-2011), kaizero (07-28-2011)
  #3  
Old 06-13-2011, 01:57 AM
Junior Member
 
Join Date: Jun 2011
Posts: 1
Thanks: 3
Thanked 0 Times in 0 Posts
crome is on a distinguished road
| More
Re: Introduction to C Programming

yep i like it....
Reply With Quote
  #4  
Old 06-13-2011, 07:55 AM
lionaneesh's Avatar
Member
 
Join Date: May 2011
Location: /root/india
Posts: 55
Thanks: 0
Thanked 11 Times in 8 Posts
lionaneesh is on a distinguished road
Send a message via Yahoo to lionaneesh Send a message via Skype™ to lionaneesh
| More
Smile Re: Introduction to C Programming

Quote:
Originally Posted by crome View Post
yep i like it....
Oh! Great! Thanks for reading my tutorial , Please read others too and let me know how you feel!
Reply With Quote
  #5  
Old 07-01-2011, 07:18 AM
jam143's Avatar
Junior Member
 
Join Date: Jul 2011
Location: philippines
Posts: 8
Thanks: 5
Thanked 0 Times in 0 Posts
jam143 is on a distinguished road
Send a message via Skype™ to jam143
| More
Re: Introduction to C Programming

ohh.. thank you so much.. I now know at least the basic..
Reply With Quote
  #6  
Old 07-01-2011, 07:43 AM
lionaneesh's Avatar
Member
 
Join Date: May 2011
Location: /root/india
Posts: 55
Thanks: 0
Thanked 11 Times in 8 Posts
lionaneesh is on a distinguished road
Send a message via Yahoo to lionaneesh Send a message via Skype™ to lionaneesh
| More
Re: Introduction to C Programming

Quote:
Originally Posted by jam143 View Post
ohh.. thank you so much.. I now know at least the basic..
My Pleasure
Reply With Quote
  #7  
Old 01-04-2012, 02:37 AM
Junior Member
 
Join Date: Jan 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
susmithareddy is on a distinguished road
| More
Re: Introduction to C Programming

thank you so much .. it is really useful to me
Reply With Quote
  #8  
Old 02-06-2012, 12:56 AM
Junior Member
 
Join Date: Feb 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
sunnybaba27 is on a distinguished road
| More
Re: Introduction to C Programming

I want to know about C programming
Should I purchase Turbo C or Borland C
I want to write embedded programming.
Reply With Quote
Reply
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
my introduction sweet_sumansharma Introduce yourself 2 09-24-2010 12:57 AM
introduction sumit12 Introduce yourself 3 09-10-2010 02:57 PM
An introduction... starlettme Introduce yourself 1 11-25-2009 11:12 PM
Introduction mebtestther Introduce yourself 1 11-15-2009 10:31 PM
Introduction Gatoimmusia Introduce yourself 1 11-09-2009 10:37 PM

 

Advertisement

CFanatic Search
Custom Search

Advertisement

All times are GMT -5. The time now is 05:27 PM.



Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO ©2010, Crawlability, Inc.
Cfanatic.com is a premier member of the IDG TechNetwork. For advertising opportunities contact here
Get Paid for Working on Projects Matching Your Expertise at Go4Expert's Jobs Board