Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

programming in c

Rating
-
Sold
-
Pages
21
Uploaded on
21-08-2023
Written in
2023/2024

Programming in C refers to the process of creating computer programs using the C programming language. C is a general-purpose, procedural programming language that was developed in the early 1970s by Dennis Ritchie at Bell Labs. It has since become one of the most widely used and influential programming languages in the history of computing. Here are some key characteristics and concepts associated with programming in C: 1. **Syntax and Structure:** C programs are written using a specific syntax and structure defined by the language. Statements and commands are structured in a way that tells the computer what actions to perform. 2. **Procedural Paradigm:** C is a procedural programming language, which means that programs are organized into functions or procedures that perform specific tasks. These functions can be called in a sequence to accomplish complex tasks. 3. **Variables and Data Types:** C allows you to declare variables to store data. Data types like integers, floating-point numbers, characters, and more are used to define the type of data a variable can hold. 4. **Control Flow:** C provides control structures such as loops (for, while, do-while) and conditional statements (if, else if, else) to control the flow of program execution based on certain conditions. 5. **Functions:** Functions are a fundamental building block in C programming. They allow you to modularize your code by breaking it into smaller, manageable pieces that can be reused throughout the program. 6. **Pointers:** Pointers are a unique feature of C that allow you to work with memory addresses directly. They are essential for tasks like dynamic memory allocation and manipulation of data structures. 7. **Memory Management:** In C, you have direct control over memory management, which can be both a powerful tool and a source of potential errors. You can allocate and deallocate memory dynamically using functions like `malloc()` and `free()`. 8. **Standard Library:** C comes with a standard library that provides a set of pre-built functions and macros to perform common tasks, such as input/output operations, string manipulation, mathematical calculations, and more. 9. **Compilation:** C programs are compiled before they can be executed. The source code is translated into machine-readable binary code by a compiler, resulting in an executable file that can be run on the target system. 10. **Portability:** C is known for its portability across different hardware architectures and operating systems. This means that a C program written on one system can often be compiled and run on another system without major modifications. 11. **Low-Level Features:** C allows you to interact closely with the hardware and perform low-level operations, making it suitable for systems programming, embedded programming, and other scenarios where fine-grained control is necessary. Programming in C can be both rewarding and challenging. While its flexibility and performance benefits make it a popular choice for various applications, its manual memory management and potential for errors require programmers to be careful and diligent in their coding practices.

Show more Read less
Institution
Course

Content preview

, EST102 Programming in C


Module I
Basics of Computer Hardware and Software, Basics of Computer Architecture: processor, Memory, Input& Output
devices. Application Software & System software: Compilers, interpreters, High level and low level languages
Introduction to structured approach to programming, Flow chart , Algorithms, Pseudo code (bubble sort, linear
search - algorithms and pseudocode)


BASICS OF COMPUTER HARDWARE AND SOFTWARE
Computer is an advanced electronic device that takes raw data as input from the user
and processes these data under the control of a set of instructions (called program stored in
memory) and gives the result (output) and saves output for the future use.

Computer Architecture




The basic components of a modern digital computer are: Input Device, Output Device, Central
Processing Unit (CPU), and memory.
Central Processing Unit (CPU)
CPU is the brain of the computer system. All major calculation and comparisons are made
inside the CPU and it is also responsible for activation and controlling the operation of other
units. This unit consists of two major components that are arithmetic logic unit (ALU) and
control unit (CU).

 Arithmetic Logic Unit (ALU)
Arithmetic logic unit performs all arithmetic operations such as addition, subtraction,
multiplication and division. It also uses logic operation for comparison.

 Control Unit (CU)
The control unit of a CPU controls the entire operation of the computer.
IIPE 1


Downloaded from Ktunotes.in

, EST102 Programming in C


It also controls all devices such as memory, input/output devices connected to the CPU.
 Additionally, CPU also has a set of registers for temporary storage of data, instructions,
addresses and intermediate results of calculation
 When the ALU, CU and the registers are all integrated on a single chip, it is called a
microprocessor thereby capturing the entire CPU on a single chip


Input /Output Unit
The input/output unit consists of devices used to transmit information between the
external world and computer memory. The information fed through the input unit is stored
in computer's memory for processing and the final result stored in memory can be
recorded or displayed on the output medium.
Examples for input devices: Mouse, Keyboard, Scanner, Joy Stick, Microphone,
OCR (Optical Character Reader), MICR (Magnetic Ink Character Reader)
Examples for output devices: Printer (Dot Matrix, Ink Jet, Laser, Line), Monitor


Memory Unit

The Memory unit refers to the area where instructions and data are stored in a
computer. The processor reads instructions and data from the memory, executes them and
writes the result back to it. Different forms of memory are used in a computer system.
They vary in their size, speed and location. Anything and everything in a computer is
stored in the form of bits known as binary language or machine language. 8 bits make up a
byte. The total number of bytes that a memory chip can hold at a time is termed as its size
or capacity. Information is stored and processed as a group of bytes, called computer word.
The word length is specific for each processor.

 The Registers - Since the group of registers is in-built within the processor chip, they
are the fastest accessible units of memory by the processor. They are highly expensive
and hence are limited in number. Some registers are used to store data while some are
reserved to store address. There are some general purpose registers as well. Size of the
registers depends on the processor. Accumulator is a register found on all processors,
which is mainly used to store the operand of an arithmetic operation. Program

IIPE 2


Downloaded from Ktunotes.in

Written for

Institution
Course

Document information

Uploaded on
August 21, 2023
Number of pages
21
Written in
2023/2024
Type
Class notes
Professor(s)
Noisytech13
Contains
All classes

Subjects

$8.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
noisytech13

Get to know the seller

Seller avatar
noisytech13 noisytech13
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
2 year
Number of followers
0
Documents
5
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions