A program is a set of instructions given to a computer to perform a specific operation. or computer is a computational device that is used to process the data under the control of a computer program. While executing the program, raw data is processed into the desired output format. These computer programs are written in a programming language which are high-level languages. High level languages are nearly human languages that are more complex than the computer understandable language which are called machine language, or low level language. So after knowing the basics, we are ready to create a very simple and basic program. Like we have different languages to communicate with each other, likewise, we have different languages like C, C++, C#, Java, python, etc to communicate with the computers. The computer only understands binary language (the language of 0’s and 1’s) also called machine-understandable language or low-level language but the programs we are going to write are in a high-level language which is almost similar to human language.
The piece of code given below performs a basic task of printing “hello world! I am learning programming” on the console screen. We must know that keyboard, scanner, mouse, microphone, etc are various examples of input devices, and monitor(console screen), printer, speaker, etc are examples of output devices.
main()
{
clrscr();
printf(“hello world! I am learning to program");
getch();
}
The main() is a standard function that you will always include in any program that you are going to create from now onwards. Note that the execution of the program starts from the main() function. The clrscr() function is used to see only the current output on the screen while the printf() function helps us to print the desired output on the screen. Also, getch() is a function that accepts any character input from the keyboard. In simple words, we need to press any key to continue(some people may say that getch() helps in holding the screen to see the output). Between high-level language and machine language, there are assembly languages also called symbolic machine code. Assembly languages are particularly computer architecture specific. Utility program (Assembler) is used to convert assembly code into executable machine code. High Level Programming Language is portable but requires Interpretation or compiling to convert it into a machine language that is computer understood. Hierarchy of Computer language –
C,
Python,
C++,
C#,
R,
Ruby,
COBOL,
ADA,
Java,
Fortran,
BASIC,
Altair BASIC,
True BASIC,
Visual BASIC,
GW BASIC,
QBASIC,
PureBASIC,
PASCAL,
Turbo,
Pascal,
GO,
ALGOL,
LISP,
SCALA,
Swift,
Rust,
Prolog,
Reia,
Racket,
Scheme,
Shimula,
Perl,
PHP,
Java,
Script,
CoffeeScript,
VisualFoxPro,
Babel,
Logo,
Lua,
Smalltalk,
Matlab,
F,
F#,
Dart,
Datalog,
dbase,
Haskell,
dylan,
Julia,
ksh,
metro,
Mumps,
Nim,
OCaml,
pick,
TCL,
D,
CPL,
Curry,
ActionScript,
Erlang,
Clojure,
DarkBASCIC,
Assembly,
C, Python, C++, Java, SCALA, C#, R, Ruby, Go, Swift, JavaScript,
- A programming language must be simple, easy to learn and use, have good readability, and be human recognizable.
- Abstraction is a must-have Characteristics for a programming language in which the ability to define the complex structure and then its degree of usability comes.
- A portable programming language is always preferred.
- Programming language’s efficiency must be high so that it can be easily converted into a machine code and executed consumes little space in memory.
- A programming language should be well structured and documented so that it is suitable for application development.
- Necessary tools for the development, debugging, testing, maintenance of a program must be provided by a programming language.
- A programming language should provide a single environment known as Integrated Development Environment(IDE).
- A programming language must be consistent in terms of syntax and semantics.
- Basic Example Of Most Popular Programming Languages:
- Here the basic code for addition of two numbers are given in some popular languages (like C, C++,Java, Python, C#, JavaScript etc.).