C Introduction - Supercoders | Web Development and Design | Tutorial for Java, PHP, HTML, Javascript C Introduction - Supercoders | Web Development and Design | Tutorial for Java, PHP, HTML, Javascript

Breaking

Post Top Ad

Post Top Ad

Friday, November 23, 2018

C Introduction

C Introduction

C programming


Introduction

C is a procedural programming language. It was initially developed by Dennis Ritchie between 1969 and 1973. It was mainly developed as a system programming language to write operating system. 

C is a powerful general-purpose programming language. It is fast, portable and available in all platforms.If you are new to programming, C is a good choice to start your programming journey.
C is a general-purpose programming language, and is used for writing programs in many different domains, such as operating systems, numerical computing, graphical applications, etc.

The main features of C language include low-level access to memory, simple set of keywords, and clean style, these features make C language suitable for system programming like operating system or compiler development.

First Book on C Programming


Book on C programming

In 1978, the first book of C programming, The C Programming Language, was published. The first edition of the book provided programmers informal specification of the language. Written by Brian Kernighan and Dennis Ritchie, this book is popular among C programmers as "K&R".
What is C programming language? 
c programming language

C is a general-purpose programming language used for wide range of applications from Operating systems like Windows and iOS to software that is used for creating 3D movies.
C programming is highly efficient. That’s the main reason why it’s very popular despite being more than 40 years old.
Standard C programs are portable. The source code written in one system works in another operating system without any change.

What will you gain if you learn C?


learn of c programming

You will understand how a computer works. C allow s you to write program.

C is the high-level programming languages like Java, python, Javascript, etc can interface with c programming.

Opportunity to work on open source projects that impact millions of people. If you need to develop a mobile app, you need Java (for Android), Swift and Objective C (for iOS). And, C is used for making Python. A large number of softwares that you use today is powered by C.

Another language that’s commonly used for large open source project is C++. If you know C and C++, you can contribute to large open source projects that impacts hundreds of millions of people.

A lot of popular programming languages are based on C (and C++, considered superset of C programming with OOP features). If you know C, you will get a head start learning C++. Languages like C# and Java are related to C and C++. Also, the syntax of JavaScript and PHP is similar to C.

Run C Programming in Windows (XP, 7, 8 and 10)

To make this procedure even easier, follow this step by step guide.

  1. Go to the binary release download page of Code:Blocks official site.
  2. Under Windows XP / Vista / 7 / 8.x / 10 section, click the link with mingw-setup(highlighted row) either from Sourceforge.net or FossHub.
window xp

  1. Open the Code::Blocks Setup file and follow the instructions (Next > I agree > Next > Install); you don’t need to change anything. This installs the Code::Blocks with gnu gcc compiler, which is the best compiler to start with for beginners.
  2. Now, open Code::Blocks and go to File > New > Empty file (Shortcut: Ctrl + Shift + N)


Write the C code and save the file with .c extension. To save the file, go to File > Save (Shortcut: Ctrl + S).

To run the program, go to Build > Build and Run (Shortcut: F9). This will build the executable file and run it.

Importance facts of C

  • All C program starts from the main() function and it’s mandatory.
  • You can use the required header file that’s necessary in the program. For example: To use sqrt() function to calculate square root and pow() function to find power of a number, you need to include math.h header file in your program.
  • C is case-sensitive; the use of uppercase letter and lowercase letter have different meanings.
  • The C program ends when the program encounters the return statement inside the main()function. However, return statement inside the main function is not mandatory.
  • The statement in a C program ends with a semicolon.

Hello World in C

#include <stdio .h>
int main()
{
 printf("Hello World\n");
 return 0;
}

Screenshot

 

hello world in c

 

No comments:

Post a Comment

Post Top Ad