SlideShare una empresa de Scribd logo
1 de 30
Sticky Bits in C ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sticky Bits in C Control Structures
Control Structures ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sticky Bits in C Variable Types And Pointers!
Data Types ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Pointer Variable Notes ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Using Pointers to Allocate Space ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sticky Bits in C Recursion Recursion Recursion Recursion Recursion Recursio Recurs
Recursion Development ,[object Object],[object Object],[object Object],[object Object],[object Object]
Recursion - Example ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],It should be noted that one of the most difficult things about recursion with Fibonacci is the magical decision to  number  the Fibonacci elements and then to use that number as  n .  This is akin to mathematical proofs where the author says “So now we let  k  stand for  a+*m%r#p^t  …”
Recursion - What is it doing!?@#! ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Fib(5) =  5   Fib(4) =  3   Fib(3) =  2   Fib(3) =  2   Fib(2) =  1   Fib(2) =  1   Fib(1) =  1   Fib(2) =  1 Fib(1) =  1   = + + + + = = = 2 2 5 3 Notice that the recursion isn’t finished at the bottom -- It must unwind all the way back to the top in order to be done.
Recursion - Should I or Shouldn’t I? ,[object Object],[object Object],[object Object],[object Object],[object Object]
Sticky Bits in C Arrays and Structs
Aggregate Data Structures ,[object Object],[object Object],[object Object],[object Object],[object Object]
Aggregate Data Types - Structures ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Structure Operations  and Member Accessing ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Arrays and Pointers and Structures Oh My! ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],H E T D S A E C M 3.95 Imad Tibi 744521111 E 4.0 Rose Axel 000003789 P 3.4 Marta Luitania 654903211 major[4] GPA first_nm last_nm ID_num
Sticky Bits in C Linked Lists
Data Structures built with Structs ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],UTA UTA UTA UTA ->next_stdt ->next_stdt ->next_stdt
Linked Lists ,[object Object],[object Object],[object Object],[object Object],[object Object],UTA UTA UTA ->next_stdt ->next_stdt ->next_stdt head travel UTA new UTA
Linked Lists ,[object Object],[object Object],[object Object],[object Object],UTA pi A list element might consist of a  uta_student  struct with a  last_name  value of  pi  along with other member values UTA UTA UTA UTA ->next_stdt ->next_stdt ->next_stdt head travel UTA new alpha phi nu  tau  zeta
Linking the List ,[object Object],[object Object],[object Object],[object Object],[object Object],new = (struct uta_student *)malloc (sizeof (struct uta_student)); new->last_name = “pi”; /* other data initialized */ (*new).next_stdt = NULL;
Linking the List ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],/* in some sort of loop */ if ( new->last_name < travel->last_name) /* then new goes in the list before travel */ else  travel = travel->next_stdt; UTA UTA UTA UTA ->next_stdt ->next_stdt ->next_stdt head travel alpha UTA new phi nu  tau  zeta
Linking the List ,[object Object],[object Object],[object Object],[object Object],[object Object],/* using the  travel  pointer and a  follow  pointer which is one link behind the  travel  pointer */ if ( new->last_name < travel->last_name) { /*  insert node */ new->next_stdt = travel; follow->next_stdt = new;  }
Doubly Linking the List ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],UTA UTA UTA UTA ->next_stdt ->next_stdt ->next_stdt head travel UTA new alpha phi nu  tau  zeta ->prev_stdt ->prev_stdt ->prev_stdt follow
Doubly Linking the List if ( new->last_name < travel->last_name) { /*  insert node */ new->next_stdt = travel; new->prev_stdt = follow; follow->next_stdt = new; travel->prev_stdt = new;   } ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],UTA UTA UTA ->next_stdt ->next_stdt follow travel tau  ->prev_stdt ->prev_stdt new nu  phi
Sticky Bits in C Debugging. Ugh.
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Debugging. Ugh.
Debugging. Ugh. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Debugging. Ugh.

Más contenido relacionado

La actualidad más candente

C interview-questions-techpreparation
C interview-questions-techpreparationC interview-questions-techpreparation
C interview-questions-techpreparation
Kushaal Singla
 
هياكلبيانات
هياكلبياناتهياكلبيانات
هياكلبيانات
Rafal Edward
 

La actualidad más candente (20)

Arrays
ArraysArrays
Arrays
 
Array Of Pointers
Array Of PointersArray Of Pointers
Array Of Pointers
 
Chapter 11 ds
Chapter 11 dsChapter 11 ds
Chapter 11 ds
 
Ch13
Ch13Ch13
Ch13
 
Unit 1 introduction to data structure
Unit 1   introduction to data structureUnit 1   introduction to data structure
Unit 1 introduction to data structure
 
Chapter 5 ds
Chapter 5 dsChapter 5 ds
Chapter 5 ds
 
Data structure using c module 1
Data structure using c module 1Data structure using c module 1
Data structure using c module 1
 
Structures and Pointers
Structures and PointersStructures and Pointers
Structures and Pointers
 
Pointers in c
Pointers in cPointers in c
Pointers in c
 
Array Cont
Array ContArray Cont
Array Cont
 
Chapter 4 ds
Chapter 4 dsChapter 4 ds
Chapter 4 ds
 
Unit v
Unit vUnit v
Unit v
 
Recursion and Sorting Algorithms
Recursion and Sorting AlgorithmsRecursion and Sorting Algorithms
Recursion and Sorting Algorithms
 
Structures
StructuresStructures
Structures
 
C interview-questions-techpreparation
C interview-questions-techpreparationC interview-questions-techpreparation
C interview-questions-techpreparation
 
C Programming - Refresher - Part II
C Programming - Refresher - Part II C Programming - Refresher - Part II
C Programming - Refresher - Part II
 
Unit 4 qba
Unit 4 qbaUnit 4 qba
Unit 4 qba
 
Unit 4 qba
Unit 4 qbaUnit 4 qba
Unit 4 qba
 
هياكلبيانات
هياكلبياناتهياكلبيانات
هياكلبيانات
 
LectureNotes-05-DSA
LectureNotes-05-DSALectureNotes-05-DSA
LectureNotes-05-DSA
 

Destacado

Chatham mba open house (10 5 2013 rc)
Chatham mba open house (10 5 2013 rc)Chatham mba open house (10 5 2013 rc)
Chatham mba open house (10 5 2013 rc)
Rachel Chung
 
Vishal anand director of bricks and mortar
Vishal anand director of bricks and mortarVishal anand director of bricks and mortar
Vishal anand director of bricks and mortar
New Projects Noida
 
Awards Ceremony: K.C.'s Nominations, Romain Rolland FLS, 2014
Awards Ceremony: K.C.'s Nominations, Romain Rolland FLS, 2014Awards Ceremony: K.C.'s Nominations, Romain Rolland FLS, 2014
Awards Ceremony: K.C.'s Nominations, Romain Rolland FLS, 2014
Tanya Madjarova
 
Supply chain-management
Supply chain-managementSupply chain-management
Supply chain-management
Neha Suman
 
Msu bmp widescreen
Msu bmp widescreenMsu bmp widescreen
Msu bmp widescreen
Josh Johnson
 
Presentation1
Presentation1Presentation1
Presentation1
kiranvpr
 

Destacado (20)

Chatham mba open house (10 5 2013 rc)
Chatham mba open house (10 5 2013 rc)Chatham mba open house (10 5 2013 rc)
Chatham mba open house (10 5 2013 rc)
 
Vishal anand director of bricks and mortar
Vishal anand director of bricks and mortarVishal anand director of bricks and mortar
Vishal anand director of bricks and mortar
 
Awards Ceremony: K.C.'s Nominations, Romain Rolland FLS, 2014
Awards Ceremony: K.C.'s Nominations, Romain Rolland FLS, 2014Awards Ceremony: K.C.'s Nominations, Romain Rolland FLS, 2014
Awards Ceremony: K.C.'s Nominations, Romain Rolland FLS, 2014
 
CSR Skills: What you need and why
CSR Skills: What you need and whyCSR Skills: What you need and why
CSR Skills: What you need and why
 
Z0955523DISS
Z0955523DISSZ0955523DISS
Z0955523DISS
 
Real ch.2 a
Real ch.2 aReal ch.2 a
Real ch.2 a
 
MyEpcTeam v1.1
MyEpcTeam v1.1MyEpcTeam v1.1
MyEpcTeam v1.1
 
Rcm
RcmRcm
Rcm
 
Supply chain-management
Supply chain-managementSupply chain-management
Supply chain-management
 
Irregular verbs
Irregular verbsIrregular verbs
Irregular verbs
 
25martiou2013
25martiou201325martiou2013
25martiou2013
 
Cv
CvCv
Cv
 
Mal ppt 2013
Mal ppt 2013Mal ppt 2013
Mal ppt 2013
 
Msu bmp widescreen
Msu bmp widescreenMsu bmp widescreen
Msu bmp widescreen
 
Notam 01 jun 15
Notam 01 jun 15Notam 01 jun 15
Notam 01 jun 15
 
Cables Brochure Web
Cables Brochure WebCables Brochure Web
Cables Brochure Web
 
Module1
Module1Module1
Module1
 
How To Keep Your Apache Project's Independence
How To Keep Your Apache Project's IndependenceHow To Keep Your Apache Project's Independence
How To Keep Your Apache Project's Independence
 
Presentation1
Presentation1Presentation1
Presentation1
 
Lesson 2
Lesson 2Lesson 2
Lesson 2
 

Similar a C1320prespost

Csc1100 lecture14 ch16_pt2
Csc1100 lecture14 ch16_pt2Csc1100 lecture14 ch16_pt2
Csc1100 lecture14 ch16_pt2
IIUM
 
C++ - UNIT_-_IV.pptx which contains details about Pointers
C++ - UNIT_-_IV.pptx which contains details about PointersC++ - UNIT_-_IV.pptx which contains details about Pointers
C++ - UNIT_-_IV.pptx which contains details about Pointers
ANUSUYA S
 
Chapter2pp
Chapter2ppChapter2pp
Chapter2pp
J. C.
 
Data structure and algorithms chapter three LINKED LIST
Data structure and algorithms chapter three LINKED LISTData structure and algorithms chapter three LINKED LIST
Data structure and algorithms chapter three LINKED LIST
binakasehun2026
 

Similar a C1320prespost (20)

Csc1100 lecture14 ch16_pt2
Csc1100 lecture14 ch16_pt2Csc1100 lecture14 ch16_pt2
Csc1100 lecture14 ch16_pt2
 
Easy Understanding of Structure Union Typedef Enum in C Language.pdf
Easy Understanding of Structure Union Typedef Enum in C Language.pdfEasy Understanding of Structure Union Typedef Enum in C Language.pdf
Easy Understanding of Structure Union Typedef Enum in C Language.pdf
 
C++ - UNIT_-_IV.pptx which contains details about Pointers
C++ - UNIT_-_IV.pptx which contains details about PointersC++ - UNIT_-_IV.pptx which contains details about Pointers
C++ - UNIT_-_IV.pptx which contains details about Pointers
 
B T0065
B T0065B T0065
B T0065
 
Pointers and Structures
Pointers and StructuresPointers and Structures
Pointers and Structures
 
DS_PPT.pptx
DS_PPT.pptxDS_PPT.pptx
DS_PPT.pptx
 
Chap 4 List of Data Structure.ppt
Chap 4 List of Data Structure.pptChap 4 List of Data Structure.ppt
Chap 4 List of Data Structure.ppt
 
structures.ppt
structures.pptstructures.ppt
structures.ppt
 
Introduction to structures in c lang.ppt
Introduction to structures in c lang.pptIntroduction to structures in c lang.ppt
Introduction to structures in c lang.ppt
 
Structured Languages
Structured LanguagesStructured Languages
Structured Languages
 
C structure and union
C structure and unionC structure and union
C structure and union
 
Chapter2pp
Chapter2ppChapter2pp
Chapter2pp
 
Data structure and algorithms chapter three LINKED LIST
Data structure and algorithms chapter three LINKED LISTData structure and algorithms chapter three LINKED LIST
Data structure and algorithms chapter three LINKED LIST
 
Structures
StructuresStructures
Structures
 
Improve Your Edge on Machine Learning - Day 1.pptx
Improve Your Edge on Machine Learning - Day 1.pptxImprove Your Edge on Machine Learning - Day 1.pptx
Improve Your Edge on Machine Learning - Day 1.pptx
 
CLASSES, STRUCTURE,UNION in C++
CLASSES, STRUCTURE,UNION in C++CLASSES, STRUCTURE,UNION in C++
CLASSES, STRUCTURE,UNION in C++
 
Cs341
Cs341Cs341
Cs341
 
Pointers and Dynamic Memory Allocation
Pointers and Dynamic Memory AllocationPointers and Dynamic Memory Allocation
Pointers and Dynamic Memory Allocation
 
C Programming - Refresher - Part III
C Programming - Refresher - Part IIIC Programming - Refresher - Part III
C Programming - Refresher - Part III
 
Data structures
Data structuresData structures
Data structures
 

Más de FALLEE31188 (20)

Lecture4
Lecture4Lecture4
Lecture4
 
Lecture2
Lecture2Lecture2
Lecture2
 
L16
L16L16
L16
 
L2
L2L2
L2
 
Inheritance
InheritanceInheritance
Inheritance
 
Inheritance
InheritanceInheritance
Inheritance
 
Functions
FunctionsFunctions
Functions
 
Field name
Field nameField name
Field name
 
Encapsulation
EncapsulationEncapsulation
Encapsulation
 
Cpp tutorial
Cpp tutorialCpp tutorial
Cpp tutorial
 
Cis068 08
Cis068 08Cis068 08
Cis068 08
 
Chapter14
Chapter14Chapter14
Chapter14
 
Chapt03
Chapt03Chapt03
Chapt03
 
C++lecture9
C++lecture9C++lecture9
C++lecture9
 
C++ polymorphism
C++ polymorphismC++ polymorphism
C++ polymorphism
 
C++ classes tutorials
C++ classes tutorialsC++ classes tutorials
C++ classes tutorials
 
Brookshear 06
Brookshear 06Brookshear 06
Brookshear 06
 
Book ppt
Book pptBook ppt
Book ppt
 
Assignment 2
Assignment 2Assignment 2
Assignment 2
 
Assignment
AssignmentAssignment
Assignment
 

Último

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Último (20)

Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 

C1320prespost