0% found this document useful (0 votes)
361 views17 pages

Ketan Kore Sunbeam Infotech

The document provides information about Ketan Kore, a trainer at Sunbeam Infotech. It then discusses computers and programs, the classification of programming languages including low-level and high-level languages. Finally, it covers C programming language in detail, including its history, standardization, features, strengths, applications, toolchain, IDE, and provides a simple "Hello World" example.

Uploaded by

Nitin Navkhare
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
361 views17 pages

Ketan Kore Sunbeam Infotech

The document provides information about Ketan Kore, a trainer at Sunbeam Infotech. It then discusses computers and programs, the classification of programming languages including low-level and high-level languages. Finally, it covers C programming language in detail, including its history, standardization, features, strengths, applications, toolchain, IDE, and provides a simple "Hello World" example.

Uploaded by

Nitin Navkhare
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

by Ketan Kore @Sunbeam Infotech

Sunbeam Infotech www.sunbeaminfo.com


About Trainer

• Mr. Ketan Kore


• Trainer at Sunbeam Infotech
• M.Sc. Computer science
• Training
• PreCAT(Training + lab )
• DAC course(LAB support)
• Contact
• Email: [email protected]
• Mobile: 8805822402

Sunbeam Infotech www.sunbeaminfo.com


Computer and Program

• 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.

Sunbeam Infotech www.sunbeaminfo.com


Classification of Languages

• 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.

Sunbeam Infotech www.sunbeaminfo.com


Low level Languages
• Machine-level language
• The machine-level language is a language that consists of a set of instructions that are in the binary form 0 or 1. As we know that
computers can understand only machine instructions, which are in binary digits, i.e., 0 and 1, so the instructions given to the computer can be
only in binary codes.
• Advantages:
• Performance is good as we are directly writing the program on machine
• Disdvantages:
• Machine dependent
• Difficult to program
• Error prone

• 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

Sunbeam Infotech www.sunbeaminfo.com


High Level Languages

• 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.

Sunbeam Infotech www.sunbeaminfo.com


C programming Language

• C programming Language is an High level Language


• C is a general-purpose programming language that is extremely popular, simple, and flexible to use.
• Machine Independent or Portable
• C language include low-level access to memory has simple set of keywords.
• C language is the most widely used language in operating systems and embedded system
development today.

Sunbeam Infotech www.sunbeaminfo.com


History

• C language was developed by Dennis Ritchie in 1972 at AT & T Bell Labs on PDP-11 machine.

• It was developed while porting UNIX from PDP-7 to PDP-11.

• Many features of C are inspired from B (Ken Thompson) and BCPL (Martin Richards).

• Initial release of C is referred as K & R C.

Sunbeam Infotech www.sunbeaminfo.com


Standardization

• C was standardized by ANSI in 1989. This is referred as C89.

• Standardization ensures C code to remain portable.

• C standard is revised multiple times to add new features in the language.


• C89 – First ANSI standard
• C90 – ANSI standard adopted by ISO
• C99 – Added few C++ features like bool, inline, etc.
• C11 – Added multi-threading feature.
• C17 – Few technical corrections.

Sunbeam Infotech www.sunbeaminfo.com


Introduction

• High-level

• Compiled

• Procedural

• Block-Structured (control structures).

• Typed

• Library Functions

Sunbeam Infotech www.sunbeaminfo.com


Features
• Data types • Strings

• Operators • Dynamic memory allocation

• Control structures • Structures

• Functions • Unions

• Storage classes • Enums

• Pointers • File IO

• Arrays • Preprocessor directives

Sunbeam Infotech www.sunbeaminfo.com


Strengths

• Low level memory access (pointers, data structures)

• Effective memory access (bitwise operators, bit-fields, unions)

• Can access OS features (functions/commands)

• Extensive library functions (math, strings, file IO, …)

• Compilers for different platforms & architectures

• Highly Readable (macros, enum, functions, …)

Sunbeam Infotech www.sunbeaminfo.com


Applications

• 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.

Sunbeam Infotech www.sunbeaminfo.com


Toolchain & IDE

• 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.

Sunbeam Infotech www.sunbeaminfo.com


Software installation

• Installations
• GCC (MinGW)
• VS Code

Sunbeam Infotech www.sunbeaminfo.com


Hello World

• Source Code
// Hello World program
#include <stdio.h>
int main() {
printf("Hello World\n");
return 0;
}
• Commands
• cmd> gcc hello.c
• cmd> ./a.exe

Sunbeam Infotech www.sunbeaminfo.com


Thank you!
Ketan Kore <[email protected]>

Sunbeam Infotech www.sunbeaminfo.com

You might also like