Welcome to the C program world

What is C program?

C is a high-level programming language that was first developed in the 1970s by Dennis Ritchie at Bell Labs. It is a general-purpose language that can be used to develop a wide variety of software, including operating systems, device drivers, desktop applications, and embedded systems.

 

Why to learn C programming?

C programming language is a MUST for students and working professionals to become a great Software Engineer specially when they are working in Software Development Domain. I will list down some of the key advantages of learning C Programming:

        Easy to learn

        Structured language

        It produces efficient programs

        It can handle low-level activities

        It can be compiled on a variety of computer platforms

 

Facts about C

        C was invented to write an operating system called UNIX.

        C is a successor of B language which was introduced around the early 1970s.

        The language was formalized in 1988 by the American National Standard Institute (ANSI).

        The UNIX OS was totally written in C.

        Today C is the most widely used and popular System Programming Language.

        Most of the state-of-the-art software have been implemented using C.

Hello world using C Programming

Just to give you a little excitement about C programming, I'm going to give you a small conventional C Programming Hello World program

#include <stdio.h>

 

int main() {

   /* my first program in C */

   printf("Hello, World! \n");

  

   return 0;

}

 

 

Let us take a look at the various parts of the above program −

        The first line of the program #include <stdio.h> is a preprocessor command, which tells a C compiler to include stdio.h file before going to actual compilation.

        The next line int main() is the main function where the program execution begins.

        The next line /*...*/ will be ignored by the compiler and it has been put to add additional comments in the program. So such lines are called comments in the program.

        The next line printf(...) is another function available in C which causes the message "Hello, World!" to be displayed on the screen.

        The next line return 0; terminates the main() function and returns the value 0.

 

 

 


Comments

Post a Comment

Popular Posts