Ketan Kore Sunbeam Infotech
Ketan Kore Sunbeam Infotech
• What is Computer?
• It is a machine/hardware/digital device which does various tasks for the user efficiently and effectively.
• • What is Program?
• Set of instructions given to the machine to do specific task.
• The low-level language is a programming language that provides no abstraction from the hardware,
and it is represented in 0 or 1 forms, which are the machine instructions.
• The high-level language is a programming language that allows a programmer to write the programs
which are independent of a particular type of computer. The high-level languages are considered as
high-level because they are closer to human languages than machine-level languages.
• Assembly Language
• The assembly language contains some human-readable commands Alphanumeric(Alphabet+numbers) codes, The
language was introduced in 1952.
• As we know that computers can only understand the machine-level instructions, so we require a translator that converts the
assembly code into machine code. The translator used for translating the code is known as an assembler.
• Advantages
• Easier to understand and use and to locate errors
• Easier to modify
• Disadvantages
• Machine dependent
• Knowledge of hardware required
• Machine level coding required
• The high-level language is a programming language that allows a programmer to write the programs
which are independent of a particular type of computer. The high-level languages are considered as
high-level because they are closer to human languages than machine-level languages.
• A compiler is required to translate a high-level language into a low-level language.
• Advantages:
• They are machine independent
• They do not require programmer to know anything about hardware
• They do not deal with machine level coding
• Disadvantages:
• It takes additional translation times to translate the source to machine code.
• High level programs are comparatively slower than low level programs.
• C language was developed by Dennis Ritchie in 1972 at AT & T Bell Labs on PDP-11 machine.
• Many features of C are inspired from B (Ken Thompson) and BCPL (Martin Richards).
• High-level
• Compiled
• Procedural
• Typed
• Library Functions
• Functions • Unions
• Pointers • File IO
• System programming
• OS development
• Device drivers
• System utilities
• Language development
• Compiler development
• Achievements (tiobe.com)
• In top-2 languages in last 40 years.
• Language of year: 2019, 2017, 2008.
• Toolchain is set of tools to convert high level language program to machine level code.
• Preprocessor
• Compiler
• Assembler
• Linker
• Debugger
• Utilities
• Popular compiler (toolchains)
• GCC
• Visual Studio
• IDE – Integrated development environment
• Visual Studio
• Eclipse
• VS Code (+ gcc)
• Turbo C
• Anjuta, KDevelop, Codeblocks, Dev C++, etc.
• Installations
• GCC (MinGW)
• VS Code
• Source Code
// Hello World program
#include <stdio.h>
int main() {
printf("Hello World\n");
return 0;
}
• Commands
• cmd> gcc hello.c
• cmd> ./a.exe