Introduction to C Programming, Slides of C programming

This is the beginning of your structured programming C.

Typology: Slides

2025/2026

Available from 06/08/2026

rakib-chowdhury
rakib-chowdhury 🇧🇩

5 documents

1 / 17

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Structured Programming
Topic: Introduction, Constant, Variables, Keywords, And Data Types.
COURSE CODE: C SE 115
COURSE TEACHER: ANIRBAN BARUA
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Introduction to C Programming and more Slides C programming in PDF only on Docsity!

Structured Programming

Topic: Introduction, Constant, Variables, Keywords, And Data Types.

COURSE CODE: CSE 115

COURSE TEACHER: ANIRBAN BARUA

Course Objectives To provide advanced knowledge and experience on structured programming To help students to develop programming skills to solve different problems To make students able to understand and implement various concepts and structures of C programming language To make students able to write reusable modules using C functions To exercise good programming practices in the design of programs

Recommended Books

  1. Programming with C - Byron S. Gottfried
  2. Programming in ANSI C - E. Balagurusamy
  3. Teach Yourself C - Herbert Schild
  4. The C Programming Language- C Kernighan & D.M. Ritchie
  5. Greg Perry, Dean Miller. “C Programming Absolute Beginner's Guide”, 3 rd ed., Que Publishing,

6 Stephen G. Kochan. “Programming in C”, 4 th ed., Addison-Wesley Professional, 2014.

Marks Distribution

  • CT:
  • Assignment:
  • Mid:
  • Final:
  • Attendance:

C Programming Language General-purpose programming language Developed in 1972 at Bell Labs by Dennis Ritchie Foundation of modern languages (C++, Java, Python, etc.) Used in operating systems, compilers, microcontrollers, embedded systems It is a high-level language

First C program structure

Types of Constants Integer Constants Real Constants Character Constants String Constants

Integer Constants C integer constant is a decimal, octal (Value starts with 0 ) or hexadecimal number (Value starts with 0 x).

Character and String Constants Character Constants must be enclosed with in single quotes. Ex: ‘a’, ‘c’ A string constant is a sequence of characters enclosed in double quotes. “hello”

Variables A variable is an identifier or a name which is used to refer a value and this value can change during the program execution A variable is written with a combination of letters, numbers and special characters Example: x, fact, c 22 , total_value

Data Types Can be divided into 2 categories:

  1. Basic/Primitive
  2. Derived Ex: Array, Struct, etc. Data Type Size Description Format Specifier int 2 or 4 bytes Stores whole numbers (no decimals) %d float 4 bytes Stores fractional numbers; accurate up to ~6–7 digits %f double 8 bytes Stores fractional numbers; accurate up to ~15 decimal digits %lf char 1 byte Stores a single character, letter, number, or ASCII value %c

Keywords Keywords are reserved words that have predefined meaning in the C language. You cannot use them as: ◦ variable names ◦ function names ◦ identifiers of any kind Data type keywords: int, float, double, char, void Control flow keywords: if, else, switch, case, default, for, while, do, break, continue Storage / Declaration keywords: const, auto, extern, static, register Other important ones: return, sizeof, typedef, struct, union, enum