SlideShare a Scribd company logo
1 of 1
Download to read offline
Briefly describe in writing on your logbook how structures and pointers can be used to create
data structures such as linked lists and trees.
Solution
structure are used to group together the variable of different data type.
Pointers are used to store the address of any data type.
With the help of the above data structures such as trees and linked list can be created.
Below are the examples:
struct Node
{
int data;
Node *next;
};
Above structure will create a linked list node.
It will hold a data of type int and to create a linked list we need to store the address of same type
of node in the current node hence we have a pointer to a type of node.
struct treenode
{
int data;
treenode *left;
treenode *right;
};
Above structure will create a node for tree.
data will hold the data of type int.
Considering it a binary tree every node has two child, one to its left and one to its right.
Since the child are of same structure hence we need to store the pointer to treenode type of
structure.

More Related Content

Similar to Briefly describe in writing on your logbook how structures and pointe.pdf

Trees - Data structures in C/Java
Trees - Data structures in C/JavaTrees - Data structures in C/Java
Trees - Data structures in C/Java
geeksrik
 
In this lab we will write code for working with a Linked List. Node .pdf
In this lab we will write code for working with a Linked List.  Node .pdfIn this lab we will write code for working with a Linked List.  Node .pdf
In this lab we will write code for working with a Linked List. Node .pdf
fms12345
 
Classification of DS Presentation Harsh.pptx
Classification of DS Presentation Harsh.pptxClassification of DS Presentation Harsh.pptx
Classification of DS Presentation Harsh.pptx
hp41112004
 
Introduction to Data Structure
Introduction to Data StructureIntroduction to Data Structure
Introduction to Data Structure
Jazz Jinia Bhowmik
 

Similar to Briefly describe in writing on your logbook how structures and pointe.pdf (20)

Chapter 8: tree data structure
Chapter 8:  tree data structureChapter 8:  tree data structure
Chapter 8: tree data structure
 
Index Structures.pptx
Index Structures.pptxIndex Structures.pptx
Index Structures.pptx
 
Link list
Link listLink list
Link list
 
Trees - Data structures in C/Java
Trees - Data structures in C/JavaTrees - Data structures in C/Java
Trees - Data structures in C/Java
 
Data structure
Data structureData structure
Data structure
 
Classification of DS.pptx
Classification of DS.pptxClassification of DS.pptx
Classification of DS.pptx
 
Bit by bit into data structures
Bit by bit into data structuresBit by bit into data structures
Bit by bit into data structures
 
Data resource management
Data resource managementData resource management
Data resource management
 
In this lab we will write code for working with a Linked List. Node .pdf
In this lab we will write code for working with a Linked List.  Node .pdfIn this lab we will write code for working with a Linked List.  Node .pdf
In this lab we will write code for working with a Linked List. Node .pdf
 
PPT_DATA STRUCTURE.ppt
PPT_DATA STRUCTURE.pptPPT_DATA STRUCTURE.ppt
PPT_DATA STRUCTURE.ppt
 
Linked list (introduction) 1
Linked list (introduction) 1Linked list (introduction) 1
Linked list (introduction) 1
 
DataStructurePpt.pptx
DataStructurePpt.pptxDataStructurePpt.pptx
DataStructurePpt.pptx
 
data structures lists operation of lists
data structures lists operation of listsdata structures lists operation of lists
data structures lists operation of lists
 
Linked list.docx
Linked list.docxLinked list.docx
Linked list.docx
 
Linked list in c
Linked list in cLinked list in c
Linked list in c
 
Dsa unit 1
Dsa unit 1Dsa unit 1
Dsa unit 1
 
Introduction to data structure
Introduction to data structureIntroduction to data structure
Introduction to data structure
 
Classification of DS Presentation Harsh.pptx
Classification of DS Presentation Harsh.pptxClassification of DS Presentation Harsh.pptx
Classification of DS Presentation Harsh.pptx
 
data structures
data structuresdata structures
data structures
 
Introduction to Data Structure
Introduction to Data StructureIntroduction to Data Structure
Introduction to Data Structure
 

More from eyevisioncare1

What is investigative reporting How is it relevant to white collar .pdf
What is investigative reporting How is it relevant to white collar .pdfWhat is investigative reporting How is it relevant to white collar .pdf
What is investigative reporting How is it relevant to white collar .pdf
eyevisioncare1
 
What impact did the Industrial Revolution have on American society b.pdf
What impact did the Industrial Revolution have on American society b.pdfWhat impact did the Industrial Revolution have on American society b.pdf
What impact did the Industrial Revolution have on American society b.pdf
eyevisioncare1
 
The memory cycle times have been much longer than processor cycle ti.pdf
The memory cycle times have been much longer than processor cycle ti.pdfThe memory cycle times have been much longer than processor cycle ti.pdf
The memory cycle times have been much longer than processor cycle ti.pdf
eyevisioncare1
 
Suppose you land on a previously unexplored South Pacific island. Yo.pdf
Suppose you land on a previously unexplored South Pacific island. Yo.pdfSuppose you land on a previously unexplored South Pacific island. Yo.pdf
Suppose you land on a previously unexplored South Pacific island. Yo.pdf
eyevisioncare1
 
State two factors that have contributed to the development of emergi.pdf
State two factors that have contributed to the development of emergi.pdfState two factors that have contributed to the development of emergi.pdf
State two factors that have contributed to the development of emergi.pdf
eyevisioncare1
 
Research and prepare a presentation to demonstrate a scenario in whi.pdf
Research and prepare a presentation to demonstrate a scenario in whi.pdfResearch and prepare a presentation to demonstrate a scenario in whi.pdf
Research and prepare a presentation to demonstrate a scenario in whi.pdf
eyevisioncare1
 
QUESTION 1Which ecological niche described below possesses the gre.pdf
QUESTION 1Which ecological niche described below possesses the gre.pdfQUESTION 1Which ecological niche described below possesses the gre.pdf
QUESTION 1Which ecological niche described below possesses the gre.pdf
eyevisioncare1
 

More from eyevisioncare1 (20)

Which of the following does NOT describe a mechanism that cells use t.pdf
Which of the following does NOT describe a mechanism that cells use t.pdfWhich of the following does NOT describe a mechanism that cells use t.pdf
Which of the following does NOT describe a mechanism that cells use t.pdf
 
Which of the following is NOT a reason to use frequency distribution.pdf
Which of the following is NOT a reason to use frequency distribution.pdfWhich of the following is NOT a reason to use frequency distribution.pdf
Which of the following is NOT a reason to use frequency distribution.pdf
 
When the body needs to conserve water, the kidneys excrete a hyperton.pdf
When the body needs to conserve water, the kidneys excrete a hyperton.pdfWhen the body needs to conserve water, the kidneys excrete a hyperton.pdf
When the body needs to conserve water, the kidneys excrete a hyperton.pdf
 
What would be a typical phenotypic monohybrid ratio in which a letha.pdf
What would be a typical phenotypic monohybrid ratio in which a letha.pdfWhat would be a typical phenotypic monohybrid ratio in which a letha.pdf
What would be a typical phenotypic monohybrid ratio in which a letha.pdf
 
What two things are added to NADP+ to convert it into NADPH H+ and .pdf
What two things are added to NADP+ to convert it into NADPH  H+ and .pdfWhat two things are added to NADP+ to convert it into NADPH  H+ and .pdf
What two things are added to NADP+ to convert it into NADPH H+ and .pdf
 
what is the medical term used for a dilated hair follicle filled .pdf
what is the medical term used for  a dilated hair follicle filled .pdfwhat is the medical term used for  a dilated hair follicle filled .pdf
what is the medical term used for a dilated hair follicle filled .pdf
 
What is investigative reporting How is it relevant to white collar .pdf
What is investigative reporting How is it relevant to white collar .pdfWhat is investigative reporting How is it relevant to white collar .pdf
What is investigative reporting How is it relevant to white collar .pdf
 
What impact did the Industrial Revolution have on American society b.pdf
What impact did the Industrial Revolution have on American society b.pdfWhat impact did the Industrial Revolution have on American society b.pdf
What impact did the Industrial Revolution have on American society b.pdf
 
What are the major inputs to the MRP systemSolutionMaterial r.pdf
What are the major inputs to the MRP systemSolutionMaterial r.pdfWhat are the major inputs to the MRP systemSolutionMaterial r.pdf
What are the major inputs to the MRP systemSolutionMaterial r.pdf
 
Type I alveolar cells(a) allow rapid diffusion of gases through t.pdf
Type I alveolar cells(a) allow rapid diffusion of gases through t.pdfType I alveolar cells(a) allow rapid diffusion of gases through t.pdf
Type I alveolar cells(a) allow rapid diffusion of gases through t.pdf
 
The memory cycle times have been much longer than processor cycle ti.pdf
The memory cycle times have been much longer than processor cycle ti.pdfThe memory cycle times have been much longer than processor cycle ti.pdf
The memory cycle times have been much longer than processor cycle ti.pdf
 
Suppose you land on a previously unexplored South Pacific island. Yo.pdf
Suppose you land on a previously unexplored South Pacific island. Yo.pdfSuppose you land on a previously unexplored South Pacific island. Yo.pdf
Suppose you land on a previously unexplored South Pacific island. Yo.pdf
 
State two factors that have contributed to the development of emergi.pdf
State two factors that have contributed to the development of emergi.pdfState two factors that have contributed to the development of emergi.pdf
State two factors that have contributed to the development of emergi.pdf
 
Recall the unambiguous grammar for arithmetic expressions discussed .pdf
Recall the unambiguous grammar for arithmetic expressions discussed .pdfRecall the unambiguous grammar for arithmetic expressions discussed .pdf
Recall the unambiguous grammar for arithmetic expressions discussed .pdf
 
Research and prepare a presentation to demonstrate a scenario in whi.pdf
Research and prepare a presentation to demonstrate a scenario in whi.pdfResearch and prepare a presentation to demonstrate a scenario in whi.pdf
Research and prepare a presentation to demonstrate a scenario in whi.pdf
 
QUESTION 1Which ecological niche described below possesses the gre.pdf
QUESTION 1Which ecological niche described below possesses the gre.pdfQUESTION 1Which ecological niche described below possesses the gre.pdf
QUESTION 1Which ecological niche described below possesses the gre.pdf
 
Practice assembly question need helpGiven the following array decl.pdf
Practice assembly question need helpGiven the following array decl.pdfPractice assembly question need helpGiven the following array decl.pdf
Practice assembly question need helpGiven the following array decl.pdf
 
Peripheral proteins function primarily as ion channels and active tra.pdf
Peripheral proteins function primarily as ion channels and active tra.pdfPeripheral proteins function primarily as ion channels and active tra.pdf
Peripheral proteins function primarily as ion channels and active tra.pdf
 
One of the main purposes of a bus system is to allow the exchange of.pdf
One of the main purposes of a bus system is to allow the exchange of.pdfOne of the main purposes of a bus system is to allow the exchange of.pdf
One of the main purposes of a bus system is to allow the exchange of.pdf
 
Most Americans are immune to the bacterium that causes Leprosy, do.pdf
Most Americans are immune to the bacterium that causes Leprosy, do.pdfMost Americans are immune to the bacterium that causes Leprosy, do.pdf
Most Americans are immune to the bacterium that causes Leprosy, do.pdf
 

Recently uploaded

SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
Peter Brusilovsky
 
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MysoreMuleSoftMeetup
 

Recently uploaded (20)

ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategies
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
Supporting Newcomer Multilingual Learners
Supporting Newcomer  Multilingual LearnersSupporting Newcomer  Multilingual Learners
Supporting Newcomer Multilingual Learners
 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDF
 
Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"
 
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
 

Briefly describe in writing on your logbook how structures and pointe.pdf

  • 1. Briefly describe in writing on your logbook how structures and pointers can be used to create data structures such as linked lists and trees. Solution structure are used to group together the variable of different data type. Pointers are used to store the address of any data type. With the help of the above data structures such as trees and linked list can be created. Below are the examples: struct Node { int data; Node *next; }; Above structure will create a linked list node. It will hold a data of type int and to create a linked list we need to store the address of same type of node in the current node hence we have a pointer to a type of node. struct treenode { int data; treenode *left; treenode *right; }; Above structure will create a node for tree. data will hold the data of type int. Considering it a binary tree every node has two child, one to its left and one to its right. Since the child are of same structure hence we need to store the pointer to treenode type of structure.