Top Banner
1 Lecture 1 Introductory Class CSE-113: Structured Programming Language 06/06/22 Md.Samsuzzaman Lecture-1 CSE-114: Structured Programming Language Lab
21
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 1_introduction

1

Lecture 1Introductory Class

CSE-113: Structured Programming Language

04/08/23Md.Samsuzzaman Lecture-1

CSE-114: Structured Programming Language

Lab

Page 2: 1_introduction

2

CSE-113

Course Code: CSE-113Course Title: Structured Programming

LanguageCourse Teacher: Md. SamsuzzamanLecturer ,Dept. of CCECredit: 3Lecture: 32

04/08/23Md.Samsuzzaman Lecture-1

Page 3: 1_introduction

3

About Class

Theory Class (CSE -113) Two classes per week:

Monday : 9:00 a.m– 10:00 am Tuesday :12.00 pm-1.00 pm Wednesday : 11:00 a.m– 12:00 pm

Lab Class: (CSE – 114) Two lab class per week for each student Even Group:

Monday: 2:15 pm – 5:00 pm Odd Group:

Thursday: 2:15 pm – 5:00 pm

04/08/23Md.Samsuzzaman Lecture-1

Page 4: 1_introduction

4

Introduce Yourself

Your name, College name?Why do you study CSE?Why do you know about Computer Science

and Engineering?Do you have a computer of your own?Any previous experience on programming?

04/08/23Md.Samsuzzaman Lecture-1

Page 5: 1_introduction

5

Syllabus

Programming concepts; Structured programming language: data types, variables, operators, type of expressions, control structures; Functions and program structures: function basics, parameter passing conventions, scope rules and storage classes, recursion; Header files; Preprocessor; Arrays, String and Pointers; User defined data type: structures, unions, enumeration; Input and output: standard input and output, formatted input and output, file access; Dynamic memory allocation, Variable length argument list; Command line parameters; Error handling; Introduction to Graphics routines.

04/08/23Md.Samsuzzaman Lecture-1

Page 6: 1_introduction

6

Gist of Syllabus (1)

Part 1: Introduction of Computer Programming, Programming style, program

design. Part 2: Programming Language in C:

programming file structure: purpose of .h and .c files, constant, variable and data types, operator and expression, type conversion, decision making, branching and looping, arrays and strings, user defined functions, structures and union, bit field and bit-wise operations, pointer, file management in C, command line arguments, dynamic memory allocation and linked list, preprocessor, low level programming, managing input/output operation.

04/08/23Md.Samsuzzaman Lecture-1

Page 7: 1_introduction

7

Reference Book

Text: Programming in ANSI C – Balagurusamy C – How to Program (4th Edition) – Deitel & Deitel C for contest—

Other Reference Book: Schaum’s Outlines: Programming with C (2nd Edition)

– Byron Gottfried Teach Yourself C (3rd Edition) – Herbert Schildt

04/08/23Md.Samsuzzaman Lecture-1

Page 8: 1_introduction

8

Course Website

www.cse.pstu.ac.bd/~cse113/ Will be updated soon. You will find

course lecture Syllabus midterm exam news Results assignments Others…

04/08/23Md.Samsuzzaman Lecture-1

Page 9: 1_introduction

9

Software required for this course

Windows Environment (any one): Microsoft Visual C++ 6 Dev-Cpp Turbo C++ 3 (We should avoid this)

04/08/23Md.Samsuzzaman Lecture-1

Page 10: 1_introduction

10

About the Course

Hardware vs. SoftwareSystem Software vs. Application SoftwareOperating SystemWhat is language? Programming language?Syntax vs. Semantics?What should we expect after completion this

course?

04/08/23Md.Samsuzzaman Lecture-1

Page 11: 1_introduction

11

Learning Style

This course is practical oriented.We will give lots of assignments.

(because practice makes a man perfect )

Memorization will not help you to get a good result.

Copying Code: Strictly prohibited. Will be severely punished if you are caught.

04/08/23Md.Samsuzzaman Lecture-1

Page 12: 1_introduction

1212

Description of C

General-purpose languageProcedural (= functions + data)Mid-levelRelatively small, simple to learnCross-platform language, single-platform compilers

(unlike Java)Char-based

04/08/23Md.Samsuzzaman Lecture-1

Page 13: 1_introduction

History Of C

Modern language ALGOL 1960sBCPL -1967, System softwareB -1970, create UNIX OS, Bell LaboratoriesB and BCPL type less C coming from ALGOL, BCPL and B by

Dennis RitchieFurther UNIX was developed by C

13

04/08/23Md.Samsuzzaman Lecture-1

Page 14: 1_introduction

1414

Why C?

Prior to C, two broad types of languages: Applications languages

High-level COBOL, etc. Portable but inefficient

Systems languages Low-level Assembly Efficient but not portable

Goal of C: efficient and portable

04/08/23Md.Samsuzzaman Lecture-1

Page 15: 1_introduction

15

04/08/23Md.Samsuzzaman Lecture-1

15

Why not Java, C++, etc.?

Java is safe and elegant, but slowC++ is unsafe and fast, but highly complexC is unsafe, but succinct and fastC/C++ is still used for:

Systems programming Windows, Unix, etc.

High-perf back-end servers

Page 16: 1_introduction

16

A Simple C Code

#include <stdio.h>

int main()

{

printf(“Welcome to CSE113\n”);

return 0;

}

04/08/23Md.Samsuzzaman Lecture-1

Page 17: 1_introduction

17

How to Run

Save a source code with extension “c” or “cpp”. (Ex: first.c)

Compile it and link it Output: first.exe

Run the program.Output of the program:

Welcome to CSE102

04/08/23Md.Samsuzzaman Lecture-1

Page 18: 1_introduction

18

Typing Speed (Not related to this course but Important)

Important for every student in CSETry to type in grammatical way – Use 10 fingers

to typeUse software to learn grammatical way of typingSpeed:

Should be at least 30 WPM (Words per minute) Preferable 35+ WPM.

Rewards..Software

Ten Thumbs Typing Software Or, any other Typing tutor software

04/08/23Md.Samsuzzaman Lecture-1

Page 19: 1_introduction

19

Puzzle Time

04/08/23Md.Samsuzzaman Lecture-1

Page 20: 1_introduction

20

Puzzle 1: Handshake

It is your first day at CSEPSTU. The teacher (SMZ) suggested that it would be a good idea for each student to meet every other student in the class. The teacher said, "When you meet, please shake hands and introduce yourself by name.“

If there were 14 student in the class, how many total handshakes were there?

Answer: ??

04/08/23Md.Samsuzzaman Lecture-1

Page 21: 1_introduction

21

Puzzle 3 - Eggs

Eight eggs look identical except one is lighter. How can you weigh only 2 times on a balance scale to find out which one is lighter?

04/08/23Md.Samsuzzaman Lecture-1