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 :- A Compiler Code Blocks [Linux and Windows] Turbo C++ [Windows] GCC and G++ 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:- “#include” is a preprocessor directive it stands for inclusion of a file before compilation! “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) { } The curly braces signal the start and the end of a function or a block! “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!!
I want to know about C programming Should I purchase Turbo C or Borland C I want to write embedded programming.
Thanks for this info. The following table shows a list of variable types and ranges that each variable might hold. DECLARATION TYPE SIZE RANGE char Character 1 byte -128 to 128 unsigned char Unsigned character 1 byte 0 to 255 int Integer 2 bytes -32768 to 32767 unsigned into Unsigned integer 2 bytes 0 to 65,535 ' signed int Signed integer(same as 2 bytes -32768 to 32767 short int Short integer 2 bytes -32768 to 32767 unsigned short int Unsigned short integer 2 bytes £ to 65,535 signed short int Signed short integer 2 bytes -327.68 to 32767 long int Long integer 4 bytes -2,141,483,648 to 2,147,483,647 signed long int Signed log4nteger 4 bytes -2,147,483,648 to 2,147,483,647 unsigned long int Unsigned long integer 4 bytes 0 to 4294967295 float Floating point T4 bytes -3.4E+38 to 3.4E+38 double Double floating point 8 bytes -1.7E+308 to 1.7E+308 long double Long double floating 8 bytes -1.7E+308 to 1.7E+308 Source business-science-articles.com/notes-lectures/bachelor-of-computer-science/programming-fundamentals/261-variables