Basic Information About C Programming Language

C Language

C is a normal high-level computer programming language. It was originally developed by Dennis Ritchie between 1969 and 1973 at Bell Laboratory. It is primarily developed to write a UNIX operating system.

Gradually, it becomes a very popular programming language in the worldwide. Key features of the C language including low-level access to memory, simple keyword settings and a neat style that makes the C language subtitle for system programmings such as operating system or compiler development.

About C Language

Many later programming languages have borrowed syntax or features directly or indirectly from C language. Java, PHP, JavaScript, and many other languages are mainly based in C language. C language has been standardized by the American National Standards Institute (ANSI) since 1989 and subsequently by the International Organization for Standardization (ISO).

This imperative procedural language is designed to be compiled with a relatively simple compiler to provide low-level access to memory, to provide constructs that map effectively process instructions, and to require minimum runtime support.

Note: C++ is almost a superset of C (very few programs can be compiled with C, but not with C++).

Basic C Program ("Hello world"):

#include<stdio.h>
int main()
{
/*Our first basic C Program*/
printf("Hello World.");
getch();
return 0;
}

Output:
     Hello World.     

Basic Commands and Explanation:

#include <stdio.h> 
This is a preprocessor command that includes input header file <stdio.h> from the C library before compile a program.

int main() 
This is the main function of executing any C program begins.

{  
This represents the beginning of the main program.

/*Our first basic c program*/ 
Any is given inside the command “/*   */” in any C program, won’t be considered for compilation and execution.

printf(“Hello_World.“); 
printf command prints the output onto the screen.

getch(); 
This command waits for any character input from the keyboard and is able to see the output of the program.

return 0; 
This command terminates C program (main function) and returns 0.

} 
This represents the ending of the main program.

Creation, Preparation, and Execution of  C Program:

  • If you want to create, compile, and execute C programs yourself, you must install the C compiler on your machine. Then you can start executing your own C program on your machine.
  • You can refer to the following link to learn how to install the C compiler and compile and execute C programs on your machine.
  • Once the C compiler is installed on your machine, you can create, compile, and execute C programs as shown in the links below.
  • If you don't want to install the C/C++ compiler on your machine, you can refer to the online compiler, which will compile and execute C/C++ and many other programming languages online and display the output on the screen. Please search Google for the online C / C++ compiler for more details.

The basic structure of the C program:

The structure of a C program is defined by a set of rules called protocols, which the programmer follows when writing a C program. All C programs have the parts/parts mentioned below.
  • Document section
  • Link section
  • Definition section
  • Global declaration section
  • Functional prototype declaration section
  • Main function
  • User-defined function definition part

Run C program Online


Run C program on Android


Run C program on Windows


Run C program on Mac OS X


Run C program on Linux

Uses:

C is widely used to implement system programming for operating systems and embedded system applications because C code can be used for most purposes when written for portability. 

But system-specific code can be used to access specific hardware when needed. The address and execution type penalty is to match the externally imposed interface requirements, and the runtime requirements for system resources are lower.

What you know about C Language?
Share your thoughts in the comment box.

3 comments:

  1. Thank you because you have been willing to share information with us. we will always appreciate all you have done here because I know you are very concerned with our. interpretation

    ReplyDelete

Powered by Blogger.