PROGRAMMING FOR PROBLEM SOLVING_ CS11030.pptx

ArjunKushwaha25 15 views 31 slides Aug 18, 2024
Slide 1
Slide 1 of 31
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31

About This Presentation

Change the programing phase


Slide Content

Kanpur Institute of Technology (An Autonomous Institute of Dr. A.P.J. Abdul Kalam Technical University, Lucknow ) Accredited grade ‘A’ by NAAC Approved by AICTE, New Delhi Autonomous status approved by UGC, New Delh Session Plan Subject: PROGRAMMING FOR PROBLEM SOLVING Subject Code: CS11030 Course /Branch : B.Tech. CS/IT/CS-AIML Semester: First Credit: Four Faculty: Ms Anushka Singh

Learning Objective Course Objective: The "Problem Solving Using C Programming" course aims to teach C programming basics, develop problem-solving skills, enhance logical thinking, train in debugging, introduce basic data structures, cover input/output operations, emphasize modular programming, and prepare for advanced studies. Pre-requisites: Knowledge of algebra, basic number theory, set theory, and logic. Familiarity with proof techniques (direct, indirect, induction), basic combinatorics, and counting principles is essential. Additionally, strong problem-solving skills and logical thinking are important.

Syllabus Of CO 1 CO 1 Introduction (8 hours) Introduction : Features of C Programming Language, C Programming Language Standard, Setting Up C Development Environment, C Hello World Program, Compiling a C Program: Behind the Scenes, C Comments, Tokens , Identifiers, Keywords Variables and Constants : C Variables, Constants , Const Qualifier , Different Ways to Declare Variable as Constant , Scope Rules, Internal Linkage and External Linkage, Global Variables . Data Types : Data Types , Data Type Modifiers , Literals , Escape Sequence in C, bool , Integer Promotions , Character Arithmetic , Type Conversion ,Input/Output: Basic Input and Output , Format Specifiers, Printf , Scanf, Scansets , Formatted and Unformatted Input and Output Functions

CO 1 Session Plan   ACADEMIC LECTURE PLAN S.No . TOPIC SUB TOPIC LINK ACTIVITY NO. OF LECTURE 1.1 INTRODUCTION Features of C Programming Language https://youtu.be/i3SWaOhjPCY?si=G_T1lJDjLHmUsEf0 Interaction with Student Lecture 1 Setting Up C Development Environment https://youtu.be/9xCskNFVt2c?si=fJ-TJ3lcVC5fiGhX Execution of Sample Program Lecture 1 C Hello World Program https://youtu.be/heVEyT9xrOE?si=FoOKx519uInFiYGg Lecture 2 1.2 VARIABLES & CONSTANTS         Variables , Constants https://youtu.be/wARq2NWj6oM?si=--JdSdbGXhGNcju1 Interaction with Student Lecture 2 Const Qualifier https://youtu.be/sbbWHC54Bdc?si=fEvS9Qd_m3QhXZ6c Lecture 2 Different Ways to Declare Variable as Constant https://youtu.be/lpv-qTazLAU?si=153KTbBUU2tGxQ1a Lecture 3 Scope Rules https://youtu.be/o4KNQYvbUAw?si=Y3TIvU0qAYfLhPEy Practical Approach With relevant examples Lecture 3 Global Variables https://youtu.be/vhvMScsdy4g?si=QhxuJyVTU7sXk_Z9 Lecture 4     Internal Linkage and External Linkage https://youtu.be/RcdASBmJi6o?si=HYJYAfR2U9r8ZcQ- Lecture 4

S.No . TOPIC SUB TOPIC LINK ACTIVITY NO. OF LECTURE 1.3 DATATYPE Data Types https://youtu.be/GHsgu3Rolys?si=tLEIuwi-gzX5_guX Practical Approach with relevant examples Lecture 4 Data Type Modifiers https://youtu.be/m23BsTtTYpg?si=yUYStRQTj-kkA681 Lecture 4 Literals https://youtu.be/2jw6jzA7ZzY?si=yDRxc0VS8kt_-JEH Lecture 5 Integer Promotions https://youtu.be/ct_a3foIN0k?si=M2QBtydDQLaFYaqD Lecture 5 Character Arithmetic https://youtu.be/gtUevZ6QN3U?si=Bv1s1G5GPqpmjYnx Lecture 5 , Escape Sequence in C https://youtu.be/gTHj_7OkNAc?si=PnzWOgF56I9bfAdU Lecture 6 Type Conversion https://youtu.be/xi2wf0Zy2Y4?si=47TB2lcsO95XS06X Lecture 6 1.4 INPUT/OUTPUT Basic Input and Output https://youtu.be/RL3-YhMKIIw?si=qJ6R59UX1Cmkb_7w Relevant examples of various types of input and outputs Lecture 7 Format Specifiers , Printf , Scanf , Scansets , https://youtu.be/XETsCR2bXJI?si=ofZKFLmFmC0yoG3n Practical Approach With relevant examples Lecture 7 Formatted and Unformatted Input and Output Functions https://youtu.be/t2mBYMdmlms?si=wQ-2XPrM0mo8pJR_ Lecture 7        

Teaching Methodologies To Be Used In CO 1 S N. Methodology 1 Pre Notes provided to the students(Soft copy/Hard copy) 2 Interaction with the students / Chalk & Talk Method 3 Execution of Sample Program using VS Code 4 Quiz/ MCQ (Weekly) 5 Question Bank will be sent to students after completion of CO-01 Evaluation Techniques To Be Used In CO 1 SN . Techniques 1 Techgig Quiz / Output Based Question in Google Forms 2 Hackerrank / GFG Problems

Complete Notes & Question Bank of CO-01 Complete Notes Link: https://drive.google.com/file/d/1Ym1tsn9ca-ztBC5NX3v4hHUrSA0N5EJV/view?usp=sharing Question Bank Link: Will uploaded soon

CO 2 Decision-Making Statements and Control Statements (8 hours) Decision-Making statements : if Statement, if…else Statement, if-else-if Ladder, Switch Statement Using Range in switch case , Control Statements , for loop, while loop, do…while Loop , continue Statement , break Statement , goto Statement Functions : User-Defined Function , Parameter Passing Techniques , Importance of Function Prototype , Return Multiple Values From a Function, main Function , Implicit Return Type int , Callbacks ,Nested Functions , Predefined Identifier Function , Maths Functions Syllabus Of CO 2

CO 2 Session Plan     ACADEMIC LECTURE PLAN S.No . TOPIC SUB TOPIC LINK ACTIVITY NO. OF LECTURE 2.1 DECISION-MAKING STATEMENTS if Statement , if…else Statement , if-else-if Ladder https://youtu.be/8VSu1qbdzm8?si=h6-a0O0sSDFgftYT relevant examples of decision making statement Lecture 8 Switch Statement Using Range in switch case , https://youtu.be/OtlFrf8YbGY?si=McoAwf9DBdEVp9Rz Lecture 9 Control Statements , for loop , while loop , do…while Loop , https://youtu.be/21l11_9Osd0?si=6KdX9a4DgnaWDx8Q relevant examples of multiple loop variables Lecture 10 continue Statement , break Statement , goto Statement https://youtu.be/Bv1LcqhqnZs?si=x96YQ_X8A2wWmmkY With relevant examples Lecture 11

2.2 FUNCTIONS User-Defined Function https://youtu.be/FbKy4Mkp5TQ?si=wRvW2NLq6Wm3WqhI With relevant examples of user-defined function Lecture 11 Parameter Passing Techniques https://youtu.be/HEiPxjVR8CU?si=UmG_odO6yfjDb-LL Practical Approach on different examples on parameter passing techniques Lecture 12 Importance of Function Prototype https://youtu.be/8sr7VBjpWHs?si=k3dJN3HmLy60Ks2o Practical Approach on different examples on the importance of Function Prototype Lecture 12 Return Multiple Values From a Function https://youtu.be/iEestjP0f9w?si=mX9Ah9a9U6eakQq8 Practical Approach With relevant examples of returning multiple values from a function Lecture 13 main Function https://youtu.be/jm2AsKycoe8?si=mToxN1ESbX16fcIL Execution of Sample Program Lecture 13 Implicit Return Type int https://youtu.be/ql2F5Am3_9E?si=Nm5laHbiLaDc4ERf Lecture 14 Callbacks https://youtu.be/wMI2k951nqs?si=2P9d1TRgvHBheZYk Lecture 14 Nested Functions https://youtu.be/SRiTiAtLeBQ?si=_WqACnnR9AszCHdX Lecture 15 Predefined Identifier Function https://youtu.be/XBeIddIgkH8?si=R7Fg45-TG2PHWm8p Lecture 16 Maths Functions https://youtu.be/X0Pz0NKdF08?si=HDHSYoX7SPhUw7If Lecture 16

Teaching Methodologies To Be Used In CO 2 S N. Methodology 1 Pre Notes provided to the students(Soft copy/Hard copy) 2 Interaction with the students / Chalk & Talk Method 3 Algorithm & Problem Discussion and Solutions on VS Code/ TurboC 4 Quiz/ MCQ (Weekly) 5 Lab Conduction & Practice Session ( HackerRank , Coding Ninja) 6 Question Bank will be prepared CO Wise Evaluation Techniques To Be Used In CO 2 SN . Techniques 1 Techgig Quiz / Output Based Question in Google Forms 2 Hackerrank / GFG

Complete Notes & Question Bank of CO-02 Complete Notes Link: Will uploaded soon Question Bank Link: Will uploaded soon

CO 3 Arrays And Strings (8 hours) Arrays : C Arrays, Properties of Array , Multidimensional Arrays, Initialization of Multidimensional Arrays ,Pass Array to Functions , Pass a 2D Array as a Parameter , Data Types for Which Array is Not Possible, Pass an Array by Value Strings in C : An Array of Strings in C, Difference Between Single Quoted and Double Quoted Initialization, String Functions. Syllabus Of CO 3

CO 3 Session Plan   ACADEMIC LECTURE PLAN S.No . TOPIC SUB TOPIC LINK ACTIVITY NO.OF LECTURE 3.1 ARRAYS C Arrays https://youtu.be/Gn7PGIEJejs?si=lKlpnxukyhEqEmmT relevant examples of Array Lecture 17 Properties of Array https://youtu.be/ReRdfSdR6RE?si=X9lYU6Y3t26_GRLq Lecture 17 Multidimensional Arrays https://youtu.be/C30NQ1vHdnY?si=xT_gm23zfkbl29QA relevant examples of Multidimensional Array Lecture 18 Pass Array to Functions https://youtu.be/gNlmJ2WrZSY?si=u0CR2Mg0iDY-rY9q Lecture 19 Pass a 2D Array as a Parameter https://youtu.be/gNlmJ2WrZSY?si=bXU_-00Ay8tnzxkh Lecture 20 Data Types for Which Array is Not Possible https://www.geeksforgeeks.org/can-we-have-an-array-of-all-types-in-c/?ref=lbp Lecture 20 3.2 STRINGS An Array of Strings in C https://youtu.be/AefKSoNpZtQ?si=2xejsfl2MI_9CaiS Interactive Session With relevant examples of An Array of Strings in C Lecture 21 Difference Between Single Quoted and Double Quoted Initialization https://youtu.be/VBtOgE_5IDo?si=23q5DY7aYzPtisSM Lecture 22 String Functions https://youtu.be/E7T2cnSjO3M?si=XPehcciqmAMMTJS7 Lecture 23

Teaching Methodologies To Be Used In CO 3 S N. Methodology 1 Pre Notes provided to the students(Soft copy/Hard copy) 2 Interaction with the students / Chalk & Talk Method 3 Execution of Sample Program using VS Code 4 Algorithm & Problem Discussion and Solutions on VS Code/ TurboC 5 Quiz/ MCQ (Weekly) 6 Lab Conduction & Practice Session ( HackerRank , Coding Ninja) 7 Question Bank will be prepared CO Wise Evaluation Techniques To Be Used In CO 3 SN . Techniques 1 Techgig Quiz / Output Based Question in Google Forms 2 Hackerrank / GFG

Complete Notes & Question Bank of CO-03 Complete Notes Link: Will uploaded soon Question Bank Link: Will uploaded soon

CO 4 User Define Data Types and Storage Classes (8 hours) User-Defined Data Types : Structures, dot (.) Operator , C typedef, Structure Member Alignment, Padding and Data Packing, Flexible Array Members in a Structure , Unions, Bit Fields , Difference Between Structure and Union, Anonymous Union and Structure , Enumeration (or Enum) . Storage Classes : extern Keyword , Static Variables , Initialization of Static Variables, Static Functions, Understanding “volatile” Qualifier, Understanding the “register” Keyword . Syllabus Of CO 4

CO 4 Session Plan   ACADEMIC LECTURE PLAN S.No . TOPIC SUB TOPIC LINK ACTIVITY NO. OF LECTURE 4.1 USER-DEFINED DATATYPE Structures https://youtu.be/vqtyDXFlS98?si=bokZSHk1PQ6I_GaQ Practical Approach With relevant examples of Structure, dot operator and typedef keyword Lecture 24 dot (.) Operator https://youtu.be/YDc9YjfmeEc?si=DNuVoFlaViHy-xSY Lecture 24 C typedef https://youtu.be/Bw3sUC6Txus?si=RkIi641aAyRcwZ7W Lecture 25 Structure Member Alignment, https://youtu.be/RR57zUBbwEM?si=2BKAOC8h9wVUFCI7 Practical Approach With relevant examples of Discussion on Structure member and alignment and padding Lecture 25 Padding and Data Packing https://youtu.be/QSuBwGmFQqA?si=XRlSC1JFBzdIEELj Lecture 26 Flexible Array Members in a Structure https://youtu.be/1h27lYe15iI?si=ir-4VhTHZbmOraoI Lecture 27 Unions https://youtu.be/7lsqAXmBTGE?si=S-wrc9qndzrz19S4 Practical Approach With relevant example of Union & Bit Fields Lecture 28 Bit Fields https://youtu.be/WdMzboP7aeE?si=diI1Iy0j92lVUUZ6 Lecture 28 Difference Between Structure and Union https://youtu.be/U1SMcGr5Qek?si=NNWNa59EKFCfHHCC Practical Approach With relevant examples of difference between structure and union Lecture 29 Anonymous Union and Structure https://youtu.be/ICbLwg0Pgz0?si=z_bKmieDabEfKG2f Lecture 29 Enumeration https://youtu.be/9QdJExC2AVg?si=-SyrYkPo1vImJyV6 Lecture 30

S.No . TOPIC SUB TOPIC LINK ACTIVITY NO. OF LECTURE 4.2 STORAGE CLASSES extern Keyword https://youtu.be/YH6jGPbrbXc?si=YdRPuWJLQW799wo- Practical Approach With relevant examples of external and static variables Lecture 31 Static Variables https://youtu.be/MVeN3GDwjUg?si=UDZjv9q2MgluEi5T Lecture 31 Initialization of Static Variables https://youtu.be/MVeN3GDwjUg?si=3MRguca2xw7mVjRE Lecture 31 Static Functions https://youtu.be/mwmvfNVhIA4?si=1Mh_IqkF2hqgjXnx Practical Approach With relevant examples of static functions Lecture 32 Understanding “volatile” Qualifier https://youtu.be/SsADrnnONSA?si=5_2JEQF1rvZr16HC Practical Approach With relevant examples of volatile and register keyword Lecture 32 Understanding the “register” Keyword https://youtu.be/8COUA5XLDKU?si=uQ7A4-wt3DOfwbyh Lecture 32        

Teaching Methodologies To Be Used In CO 4 S N. Methodology 1 Pre Notes provided to the students(Soft copy/Hard copy) 2 Interaction with the students 3 Execution of Sample Program using VS Code 4 Algorithm & Problem Discussion and Solutions on VS Code/ TurboC 5 Quiz/ MCQ (Weekly) 6 Lab Conduction & Practice Session ( HackerRank , Coding Ninja) 7 Question Bank will be prepared CO Wise Evaluation Techniques To Be Used In CO 4 SN . Techniques 1 Techgig Quiz / Output Based Question in Google Forms 2 Hackerrank / GFG

Complete Notes & Question Bank of CO-04 Complete Notes Link: Will uploaded soon Question Bank Link: Will uploaded soon

CO 5 Memory Managements, Pointer and Error Handling (8 hours) Memory Management : Memory Layout of C Programs, Dynamic Memory Allocation , Difference Between malloc() and calloc(), Memory Leak, Dynamic Array in C, Dynamically Allocate a 2D Array , Dynamically Growing Array. Pointers : Pointer Arithmetics , Pointer to Pointer (Double Pointer), Function Pointer , Declare Function Pointer , Pointer to an Array, Constant Pointer , Pointer vs Array , Restrict Keyword . File Handling : Basics of File Handling , fopen() Function, EOF, getc() and feof(), fgets() and gets() , fseek() vs rewind() , Return Type of getchar(), fgetc() and getc(), Read/Write Structure From/to a File , Difference, Between printf, sprintf and fprintf, Difference Between getc(), getchar(), getch() and getche() . Error Handling : Error Handling in C, Using goto for Exception Handling in C, Error Handling During File Operations in C. Syllabus Of CO 5

  ACADEMIC LECTURE PLAN S.No . TOPIC SUB TOPIC LINK ACTIVITY NO. OF LECTURE 5.1 MEMORY MANAGEMENT Memory Layout of C Programs https://youtu.be/PeohtAsvtHg?si=rAFZXua4KlPXOk_g Practical Approach With relevant examples of Memory Layout of C Program and DMA Lecture 33 Dynamic Memory Allocation https://youtu.be/q8j8EqCZcWM?si=luqpF3ifgDkeMu8P Lecture 33 Difference Between malloc () and calloc () https://youtu.be/4ZhRiWM8eUk?si=PQDhy1Tv6r6GxN8R Practical Approach With relevant examples for malloc , calloc , memory leak and dynamic array Lecture 33 Memory Leak https://youtu.be/5tFhNUJSFrc?si=PzRXIdmQC3q3Rn0l Lecture 33 Dynamic Array in C https://youtu.be/jzJlq35dQII?si=3-2rczy_6JWmKqAt Lecture 34 CO 5 Session Plan

5.2 POINTERS         Pointer Arithmetics https://youtu.be/gwqbYnxQGR8?si=l4g5MIpqk5oo74px Interactive Session With relevant examples Lecture 34 Pointer to Pointer (Double Pointer) https://youtu.be/ahKfY1EsWd8?si=-g4SVHifgKSh8k_z Lecture 34 Function Pointer https://youtu.be/BRsv3ZXoHto?si=xWgNae_CNqoqIbia Lecture 35 Declare Function Pointer https://youtu.be/axngwDJ79GY?si=rW64WjTxoYb-yDBn Lecture 35 Pointer to an Array https://youtu.be/M4AmUzIxalo?si=swdqdwfAQFT7ExOg Lecture 36 Constant Pointer https://youtu.be/WB9xr4R1Pz8?si=hpxnIOEc-JG0v1Xr Lecture 36 Pointer vs Array https://youtu.be/v_BWyFEWP80?si=m47KuCkyzEpXnxAw Lecture 37 Restrict Keyword https://youtu.be/ohXjzvcX6Ic?si=b2Lxr54vNEVtj5Uz Lecture 37 5.3 FILE HANDLING         Basics of File Handling https://youtu.be/ZIe_j8xAkU4?si=rNO9UgoveC5Ff9h1 Interactive Session With relevant examples Lecture 38   of getchar (), fgetc () and getc () , Read/Write Structure From/to a File https://youtu.be/xtEdjl2LVu8?si=JNZIOozhZ_Ez8U9W Lecture 38 Difference Between getc (), getchar (), getch () and getche () https://youtu.be/2TNBIG73bjE?si=rESWCUkKvDyF1t-7 Lecture 39 5.4 ERROR HANDLING Error Handling in C https://youtu.be/AmQ4mMpbb1Y?si=NZXUF2fgVXI0WJRT Interactive Session With relevant examples Lecture 39 Using goto for Exception Handling in C https://youtu.be/AWUxfROdzPc?si=X2atLoXq_TztPQBa Lecture 40 Error Handling During File Operations in C https://youtu.be/vnmSRt4OnG0?si=ZC_r9KBWUCt3-ibV Lecture 40

Teaching Methodologies To Be Used In CO 5 S N. Methodology 1 Pre Notes provided to the students(Soft copy/Hard copy) 2 Interaction with the students 3 Execution of Sample Program using VS Code 4 Algorithm & Problem Discussion and Solutions on VS Code/ TurboC 5 Quiz/ MCQ (Weekly) 6 Lab Conduction & Practice Session ( HackerRank , Coding Ninja) 7 Question Bank will be prepared CO Wise Evaluation Techniques To Be Used In CO 5 SN . Techniques 1 Techgig Quiz / Output Based Question in Google Forms 2 Hackerrank / GFG

Complete Notes & Question Bank of CO-05 Complete Notes Link: Will uploaded soon Question Bank Link: Will uploaded soon

Course Outcome (CO) Bloom’s Level At the end of course, the student will be able to: CO1 To Write Simple Algorithms for Arithmetic and Logical Problems K2, K3 CO2 To Translate the Algorithms to Programs & Execution (in C Language). K3 CO3 To Implement Conditional Branching, Iteration and Recursion K 3 CO4 To Decompose a Problem into Functions and Synthesize a Complete Program Using Divide and Conquer Approach K 4 CO5 To Use Arrays, Pointers and Structures to Develop Algorithms and Programs. K4
Tags