SlideShare una empresa de Scribd logo
1 de 39
Descargar para leer sin conexión
Team Emertxe
Advanced Pointers,Arrays
and Functions
Assignment 1
Assignment 1
Assignment 1
Provide a menu to manipulate or display the value of
variable of type t
Assignment 1
Provide a menu to manipulate or display the value of
variable of type t
Input:
Assignment 1
Provide a menu to manipulate or display the value of
variable of type t
Input: Integers N1 and N2
Assignment 1
Provide a menu to manipulate or display the value of
variable of type t
Input: Integers N1 and N2
Output: To provide a menu to display and manipulate the value
of variable type t
Examples:-
Assignment 1
Examples:-
 Step 1: Allocate 8 consecutive bytes in memory.
Assignment 1
Examples:-
 Step 1: Allocate 8 consecutive bytes in memory.
Assignment 1
0 1 2 3 4 5 6 7
Examples:-
Assignment 1
0 1 2 3 4 5 6 7
char short int/float
0 1 2 3 4 5 6 7
double
OR
Examples:-
 Step 2: Initialize 6 flags.
2 flags -> char
1 flag -> float
1 flag -> int
1 flag -> short
1 flag -> double
 Initialize all the flags to zero.
Assignment 1
Examples:-
 Step 3: Display the Menu 1.
1. Add element
2. Display element
3. Remove element
4. Exit from the program.
Assignment 1
Examples:-
 Step 3.1: Add element.
 Display Menu 2
1. int
2. char
3. float
4. double
Assignment 1
Examples:-
 Step 3.1: Add element.
 If user chooses ‘char’ type, read the character and store it in
0th index. Assume character ‘k’.
 After adding the character, make that respective flag to 1.
 Now, char_flag1 =1.
Assignment 1
k
0 1 2 3 4 5 6 7
char short int/float
Examples:-
Assignment 1
k
0 1 2 3 4 5 6 7
char short int/float
char_flag1 = 1
Examples:-
 Step 3.1: Add element.
 If user chooses ‘float’ type, read the floating number and store
it in 4th index. Assume number is 6.5.
 After adding the number, make that respective flag to 1.
 Now, float_flag1 =1.
Assignment 1
k 6.5
0 1 2 3 4 5 6 7
char short int/float
Examples:-
Assignment 1
0 1 2 3 4 5 6 7
char short int/float
float_flag = 1
k 6.5
char_flag1 = 1
Examples:-
 Step 3.1: Add element.
 If user chooses ‘int’ type, Assume 4.
 Print error message ‘Don’t have enough space to store’ because
float element is already present.
Assignment 1
k 6.5
0 1 2 3 4 5 6 7
char short int/float
Examples:-
 Step 3.2: Display element.
 Based on the flag values print the elements.
 If the flag value is 1, display the element.
 Here char_flag1 and float_flag is 1, so k and 6.5 will be
displayed.
Assignment 1
k 6.5
0 1 2 3 4 5 6 7
char short int/float
Examples:-
 Step 3.3: Remove element.
Assignment 1
Examples:-
 Step 3.3: Remove element.
Is it possible to remove the elements?
Assignment 1
Examples:-
 Step 3.3: Remove element.
 Is it possible to remove the elements?
No.
 So, for removing the elements, make the flag of particular
index to 0. Hence while displaying, those elements will not
displayed.
Assignment 1
Examples:-
 Step 3.3: Remove element.
 Read the index value to be deleted. Assume 0th index.
 Make the char_flag1 = 0.
Assignment 1
k 6.5
0 1 2 3 4 5 6 7
char short int/float
Examples:-
Assignment 1
0 1 2 3 4 5 6 7
char short int/float
float_flag = 1
k 6.5
char_flag1 = 0
Examples:-
 Step 3.2: Display element.
 Now only the float_flag is 1 so 6.5 will be displayed.
Assignment 1
k 6.5
0 1 2 3 4 5 6 7
char short int/float
float_flag = 1
char_flag1 = 0
Examples:-
 Step 3.4: Exiting from the program.
 Use exit 0 to come out of the program.
Assignment 1
Sample execution:-
Assignment 1
Sample execution:-
Assignment 1
Sample execution:-
Assignment 1
Sample execution:-
Assignment 1
Sample execution:-
Assignment 1
Sample execution:-
Assignment 1
Assignment 1
Pre-requisites:-
Assignment 1
Pre-requisites:-
⮚ Pointers
Assignment 1
Pre-requisites:-
⮚ Pointers
⮚ Dynamic Memory Allocation
Assignment 1
Pre-requisites:-
⮚ Pointers
⮚ Dynamic Memory Allocation
Objective:-
Assignment 1
Pre-requisites:-
⮚ Pointers
⮚ Dynamic Memory Allocation
Objective:-
⮚ To understand the concept of Dynamic Memory Allocation
Team Emertxe
Thank you

Más contenido relacionado

Similar a 01_memory_manager.pdf

MP 4 – Continuation-Passing StyleCS 421 – Fall 2012Revis.docx
MP 4 – Continuation-Passing StyleCS 421 – Fall 2012Revis.docxMP 4 – Continuation-Passing StyleCS 421 – Fall 2012Revis.docx
MP 4 – Continuation-Passing StyleCS 421 – Fall 2012Revis.docx
rosemarybdodson23141
 
Part 1 Project Setup, Building the ViewUIIn the video belo.pdf
Part 1 Project Setup, Building the ViewUIIn the video belo.pdfPart 1 Project Setup, Building the ViewUIIn the video belo.pdf
Part 1 Project Setup, Building the ViewUIIn the video belo.pdf
amazing2001
 
Loop structures chpt_6
Loop structures chpt_6Loop structures chpt_6
Loop structures chpt_6
cmontanez
 
Stack_Overview_Implementation_WithVode.pptx
Stack_Overview_Implementation_WithVode.pptxStack_Overview_Implementation_WithVode.pptx
Stack_Overview_Implementation_WithVode.pptx
chandankumar364348
 
Vb6 ch.7-3 cci
Vb6 ch.7-3 cciVb6 ch.7-3 cci
Vb6 ch.7-3 cci
Fahim Khan
 
1 CS110 - Introduction to Computers and Applications .docx
1  CS110 - Introduction to Computers and Applications .docx1  CS110 - Introduction to Computers and Applications .docx
1 CS110 - Introduction to Computers and Applications .docx
honey725342
 

Similar a 01_memory_manager.pdf (20)

Python Objects
Python ObjectsPython Objects
Python Objects
 
c_programming.pdf
c_programming.pdfc_programming.pdf
c_programming.pdf
 
ScalaLanguage_ch_4_5.pptx
ScalaLanguage_ch_4_5.pptxScalaLanguage_ch_4_5.pptx
ScalaLanguage_ch_4_5.pptx
 
CPP homework help
CPP homework helpCPP homework help
CPP homework help
 
MP 4 – Continuation-Passing StyleCS 421 – Fall 2012Revis.docx
MP 4 – Continuation-Passing StyleCS 421 – Fall 2012Revis.docxMP 4 – Continuation-Passing StyleCS 421 – Fall 2012Revis.docx
MP 4 – Continuation-Passing StyleCS 421 – Fall 2012Revis.docx
 
Part 1 Project Setup, Building the ViewUIIn the video belo.pdf
Part 1 Project Setup, Building the ViewUIIn the video belo.pdfPart 1 Project Setup, Building the ViewUIIn the video belo.pdf
Part 1 Project Setup, Building the ViewUIIn the video belo.pdf
 
Stack.pptx
Stack.pptxStack.pptx
Stack.pptx
 
Network Planning and Optimization
Network Planning and OptimizationNetwork Planning and Optimization
Network Planning and Optimization
 
Unit 3 Stacks and Queues.pptx
Unit 3 Stacks and Queues.pptxUnit 3 Stacks and Queues.pptx
Unit 3 Stacks and Queues.pptx
 
The1
The1The1
The1
 
Stacks IN DATA STRUCTURES
Stacks IN DATA STRUCTURESStacks IN DATA STRUCTURES
Stacks IN DATA STRUCTURES
 
Unit 2-data types,Variables,Operators,Conitionals,loops and arrays
Unit 2-data types,Variables,Operators,Conitionals,loops and arraysUnit 2-data types,Variables,Operators,Conitionals,loops and arrays
Unit 2-data types,Variables,Operators,Conitionals,loops and arrays
 
Stack1
Stack1Stack1
Stack1
 
DSA- Unit III- STACK AND QUEUE
DSA- Unit III- STACK AND QUEUEDSA- Unit III- STACK AND QUEUE
DSA- Unit III- STACK AND QUEUE
 
STLStack.pdf
STLStack.pdfSTLStack.pdf
STLStack.pdf
 
Loop structures chpt_6
Loop structures chpt_6Loop structures chpt_6
Loop structures chpt_6
 
Stack_Overview_Implementation_WithVode.pptx
Stack_Overview_Implementation_WithVode.pptxStack_Overview_Implementation_WithVode.pptx
Stack_Overview_Implementation_WithVode.pptx
 
Vb6 ch.7-3 cci
Vb6 ch.7-3 cciVb6 ch.7-3 cci
Vb6 ch.7-3 cci
 
1 CS110 - Introduction to Computers and Applications .docx
1  CS110 - Introduction to Computers and Applications .docx1  CS110 - Introduction to Computers and Applications .docx
1 CS110 - Introduction to Computers and Applications .docx
 
Python PPT2
Python PPT2Python PPT2
Python PPT2
 

Más de Emertxe Information Technologies Pvt Ltd

Más de Emertxe Information Technologies Pvt Ltd (20)

premium post (1).pdf
premium post (1).pdfpremium post (1).pdf
premium post (1).pdf
 
Career Transition (1).pdf
Career Transition (1).pdfCareer Transition (1).pdf
Career Transition (1).pdf
 
10_isxdigit.pdf
10_isxdigit.pdf10_isxdigit.pdf
10_isxdigit.pdf
 
01_student_record.pdf
01_student_record.pdf01_student_record.pdf
01_student_record.pdf
 
02_swap.pdf
02_swap.pdf02_swap.pdf
02_swap.pdf
 
01_sizeof.pdf
01_sizeof.pdf01_sizeof.pdf
01_sizeof.pdf
 
07_product_matrix.pdf
07_product_matrix.pdf07_product_matrix.pdf
07_product_matrix.pdf
 
06_sort_names.pdf
06_sort_names.pdf06_sort_names.pdf
06_sort_names.pdf
 
05_fragments.pdf
05_fragments.pdf05_fragments.pdf
05_fragments.pdf
 
04_magic_square.pdf
04_magic_square.pdf04_magic_square.pdf
04_magic_square.pdf
 
03_endianess.pdf
03_endianess.pdf03_endianess.pdf
03_endianess.pdf
 
02_variance.pdf
02_variance.pdf02_variance.pdf
02_variance.pdf
 
09_nrps.pdf
09_nrps.pdf09_nrps.pdf
09_nrps.pdf
 
11_pangram.pdf
11_pangram.pdf11_pangram.pdf
11_pangram.pdf
 
10_combinations.pdf
10_combinations.pdf10_combinations.pdf
10_combinations.pdf
 
08_squeeze.pdf
08_squeeze.pdf08_squeeze.pdf
08_squeeze.pdf
 
07_strtok.pdf
07_strtok.pdf07_strtok.pdf
07_strtok.pdf
 
06_reverserec.pdf
06_reverserec.pdf06_reverserec.pdf
06_reverserec.pdf
 
05_reverseiter.pdf
05_reverseiter.pdf05_reverseiter.pdf
05_reverseiter.pdf
 
04_itoa.pdf
04_itoa.pdf04_itoa.pdf
04_itoa.pdf
 

Último

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Último (20)

Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
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
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.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
 
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
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
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Ữ Â...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 

01_memory_manager.pdf