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

Introduction to Computing and C Language

The document provides an introduction to computing and the C programming language, detailing the process of creating and running programs, system development, and the characteristics of C as a middle-level and structured language. It explains the compilation process, the role of compilers and interpreters, and the memory map of a C program. Additionally, it covers the organization of code, libraries, and separate compilation for large programs.

Uploaded by

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

Introduction to Computing and C Language

The document provides an introduction to computing and the C programming language, detailing the process of creating and running programs, system development, and the characteristics of C as a middle-level and structured language. It explains the compilation process, the role of compilers and interpreters, and the memory map of a C program. Additionally, it covers the organization of code, libraries, and separate compilation for large programs.

Uploaded by

Lata
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Introduction to Computing &

Overview of C Language
By: ChatGPT | Simplified
Programming Concepts
Introduction to Computing
• Computing means using computers to process
data and perform tasks like calculation,
communication, and control.
Computer Languages
• Computer languages allow humans to
communicate with computers.

• Types:
• • Machine Language – Binary code (e.g.,
10110011)
• • Assembly Language – Mnemonics (e.g.,
MOV A, B)
• • High-Level Language – Human-readable
(e.g., C, Python)
Creating and Running Programs
• Steps:
• 1. Write code using an editor
• 2. Compile to convert source to object code
• 3. Link with libraries
• 4. Run the executable

• Example:
• #include <stdio.h>
• void main() { printf("Hello C"); }
System Development
• Software development includes:
• 1. Requirement Analysis
• 2. Design
• 3. Coding
• 4. Testing
• 5. Implementation & Maintenance
Overview of C Language
• C was developed by Dennis Ritchie in 1972 at
Bell Labs.
• It was used to develop UNIX and influenced
languages like C++, Java, and Python.
C as a Middle-Level Language
• C combines features of both high-level and
low-level languages.
• It allows direct hardware access as well as
structured programming.

• Example:
• int a = 5;
• printf("Hello World");
C as a Structured Language
• C organizes code into functions and control
structures for clarity and modularity.

• Example:
• void main() {
• int a = 10;
• if(a > 5)
• printf("A is large");
• }
C is a Programmer’s Language
• C gives programmers full control over memory
and system resources.
• It has powerful features but requires careful
handling.
Compilers vs Interpreters
• Compiler – Translates the entire code at once
(e.g., C, C++)
• Interpreter – Translates line-by-line (e.g.,
Python)

• Compiled programs run faster, interpreted


ones are easier to debug.
Form of a C Program
• #include <stdio.h>
• void main() {
• printf("Hello World");
• }

• Every program has:


• 1. Preprocessor Directives
• 2. Main Function
• 3. Statements inside braces
Library and Linking
• Libraries contain predefined functions (like
printf, scanf).
• Linking combines object files and libraries into
one executable.
Separate Compilation
• Large programs can be divided into multiple
source files (.c) and compiled separately.
• Then linked together to form one program.
Compiling a C Program
• Steps of Compilation:
• 1. Preprocessing (#include, #define)
• 2. Compilation (source → object)
• 3. Linking (object + library)
• 4. Execution
C’s Memory Map
• When a program runs, memory is divided into
sections:
• • Code Segment – Program instructions
• • Stack – Function calls and local variables
• • Heap – Dynamic memory (malloc, free)
• • Data Segment – Global/static variables
• • Text Segment – Constants and literals
Visual: Compilation Process
• Source Code (.c)
• ↓ Preprocessor
• ↓ Compiler
• ↓ Object Code (.obj)
• ↓ Linker + Libraries
• ↓ Executable (.exe)
Visual: Memory Map
• ┌──────────────────────┐
• │ Text Segment (code) │
• ├──────────────────────┤
• │ Data Segment (global)│
• ├──────────────────────┤
• │ Heap (dynamic) │
• ├──────────────────────┤
• │ Stack (local vars) │
• └──────────────────────┘

You might also like