SlideShare a Scribd company logo
1 of 12
Subject : Computer Programing And
Utilization (2110003)
Topic Name: POINTERS AND ARRAYS
OUTLINE
 POINTERS
 ARRAYS
 POINTERS AND ARRAYS
 ARRAY OF POINTERS
POINTERS
A POINTER IS A VARIABLE WHICH CONTAINS
ADDRESS (IN MEMORY) OF ANOTHER VARIABLE.
POINTERS ARE SYMBOLIC REPRESENTATION OF
ADDRESS.
WE CAN HAVE A POINTER TO ANY VARIABLE TYPE.
IN OTHER WORDS , WE CAN TALK ABOUT ITS
ADDRESS RATHER THAN ITS VALUE.
ARRAYS
AN ARRAY IS COLLECTION OF DATA ITEMS
THOSE ARE OF SAME TYPES.
AN ARRAY SIZE IS FIXED. IT CAN NOT BE
CHANGED AFTER DECLARATION.
THE ORDER OF THE ELEMENTS IS ALSO FIXED.
EXAMPLE: A LIST OF TELEPHONE NUMBERS
EXPRESSION a[4] REFERS TO THE 5TH
ELEMENT OF
ARRAY a
POINTERS AND ARRAYS
AN ARRAY NAME IS BASICALLY A CONST POINTER.
YOU CAN USE THE [] OPERATOR WITH A POINTER;
int *x;
int a[10];
x = &a[2] ;
x is “the address of a[2]”
POINTERS AND ARRAYS
FOR EXAMPLE :- int rollno[4]={100,101,102,103};
HERE BASE ADDRESS IS 5000, THEN FOUR ELEMENTS
ARE STORED AS FOLLOWS:
Array
Element
rollno[0] rollno[1] rollno[2] rollno[3]
Value 100 101 102 103
Address 5000 5002 5004 5006
IF WE WRITE &rollno[0] , IT REFERS TO THE
ADDRESS OF AN ARRAY rollno.
POINTERS AND ARRAYS
IF WE DEFINE int*p , THEN TO ASSIGN ADDRESS
OF THE ARRAY,
WE CAN WRITE :-
p=rollno OR p=rollno[0];
Pointer Value Array Element
Address
Actual Value
p &rollno[0] 5000
p++ or p+1 &rollno[1] 5002
p+2 &rollno[2] 5004
p+3 &rollno[3] 5006
#include <stdio.h>
int main ()
{
double balance[5] = {1000.0, 2.0, 3.4, 17.0, 50.0};
double *p;
int i;
p = balance;
printf( "Array values using pointern");
for ( i = 0; i < 5; i++ )
{printf("*(p + %d) : %fn", i, *(p + i) ); }
printf( "Array values using balance as addressn");
for ( i = 0; i < 5; i++ ) {
printf("*(balance + %d) : %fn", i, *(balance + i) );
}
return 0;
}
When the above code is compiled and
executed, it produces the following result −
Array values using pointer
*(p + 0) : 1000.000000
*(p + 1) : 2.000000
*(p + 2) : 3.400000
*(p + 3) : 17.000000
*(p + 4) : 50.000000
Array values using balance as address
*(balance + 0) : 1000.000000
*(balance + 1) : 2.000000
*(balance + 2) : 3.400000
*(balance + 3) : 17.000000
*(balance + 4) : 50.000000
ARRAYS OF POINTERS
POINTERS CAN BE USED TO HANDLE TABLE OF
STRINGS.
WE CAN USE POINTER TO A STRING FOR
FOLLOWING REASONS :-
1.ALL NAMES ARE ALMOSTLY NOT OF EQUAL
LENGTH SO POINTER CAN BE USED FOR
VARYING LENGTH.
2.MAKING FIXED SIZE ROW WASTES MEMORY.
name[0] R A J 0
name[1] R A M K R I S H N A 0
HERE WE NEED ONLY 15 BYTES WITH POINTER
ALLOCATION INSTEAD OF 40 BYTES WITH FIXED
ALLOCATION.
Arrays and Pointers

More Related Content

What's hot (20)

Pointers in c v5 12102017 1
Pointers in c v5 12102017 1Pointers in c v5 12102017 1
Pointers in c v5 12102017 1
 
Fundamentals of Pointers in C
Fundamentals of Pointers in CFundamentals of Pointers in C
Fundamentals of Pointers in C
 
ppt on pointers
ppt on pointersppt on pointers
ppt on pointers
 
Pointers in C
Pointers in CPointers in C
Pointers in C
 
Pointers in C Language
Pointers in C LanguagePointers in C Language
Pointers in C Language
 
Pointer in c
Pointer in cPointer in c
Pointer in c
 
C++ lecture 04
C++ lecture 04C++ lecture 04
C++ lecture 04
 
Array Of Pointers
Array Of PointersArray Of Pointers
Array Of Pointers
 
Array
ArrayArray
Array
 
Pointers in c - Mohammad Salman
Pointers in c - Mohammad SalmanPointers in c - Mohammad Salman
Pointers in c - Mohammad Salman
 
pointers
pointerspointers
pointers
 
Presentation of c 1
Presentation of c 1Presentation of c 1
Presentation of c 1
 
C++ programming (Array)
C++ programming (Array)C++ programming (Array)
C++ programming (Array)
 
02 c++ Array Pointer
02 c++ Array Pointer02 c++ Array Pointer
02 c++ Array Pointer
 
Array C programming
Array C programmingArray C programming
Array C programming
 
Learn Function The Hard Way
Learn Function The Hard WayLearn Function The Hard Way
Learn Function The Hard Way
 
Pointers
PointersPointers
Pointers
 
Intermediate code representations
Intermediate code representationsIntermediate code representations
Intermediate code representations
 
Arrays in c
Arrays in cArrays in c
Arrays in c
 
Pointers in C
Pointers in CPointers in C
Pointers in C
 

Similar to Arrays and Pointers

Similar to Arrays and Pointers (20)

Pointers in c++
Pointers in c++Pointers in c++
Pointers in c++
 
pointers.pptx
pointers.pptxpointers.pptx
pointers.pptx
 
Ponters
PontersPonters
Ponters
 
Pointers and Dynamic Memory Allocation
Pointers and Dynamic Memory AllocationPointers and Dynamic Memory Allocation
Pointers and Dynamic Memory Allocation
 
Unit-I Pointer Data structure.pptx
Unit-I Pointer Data structure.pptxUnit-I Pointer Data structure.pptx
Unit-I Pointer Data structure.pptx
 
Pointer in C
Pointer in CPointer in C
Pointer in C
 
C pointers and references
C pointers and referencesC pointers and references
C pointers and references
 
EASY UNDERSTANDING OF POINTERS IN C LANGUAGE.pdf
EASY UNDERSTANDING OF POINTERS IN C LANGUAGE.pdfEASY UNDERSTANDING OF POINTERS IN C LANGUAGE.pdf
EASY UNDERSTANDING OF POINTERS IN C LANGUAGE.pdf
 
Chapter5.pptx
Chapter5.pptxChapter5.pptx
Chapter5.pptx
 
Pointers
PointersPointers
Pointers
 
Lect 9(pointers) Zaheer Abbas
Lect 9(pointers) Zaheer AbbasLect 9(pointers) Zaheer Abbas
Lect 9(pointers) Zaheer Abbas
 
4 Pointers.pptx
4 Pointers.pptx4 Pointers.pptx
4 Pointers.pptx
 
Lect 8(pointers) Zaheer Abbas
Lect 8(pointers) Zaheer AbbasLect 8(pointers) Zaheer Abbas
Lect 8(pointers) Zaheer Abbas
 
Ch 7-pointers
Ch 7-pointersCh 7-pointers
Ch 7-pointers
 
C++ Pointers with Examples.docx
C++ Pointers with Examples.docxC++ Pointers with Examples.docx
C++ Pointers with Examples.docx
 
Pointers+(2)
Pointers+(2)Pointers+(2)
Pointers+(2)
 
Pointers C programming
Pointers  C programmingPointers  C programming
Pointers C programming
 
Pointers and single &multi dimentionalarrays.pptx
Pointers and single &multi dimentionalarrays.pptxPointers and single &multi dimentionalarrays.pptx
Pointers and single &multi dimentionalarrays.pptx
 
Engineering Computers L32-L33-Pointers.pptx
Engineering Computers L32-L33-Pointers.pptxEngineering Computers L32-L33-Pointers.pptx
Engineering Computers L32-L33-Pointers.pptx
 
Pointers
PointersPointers
Pointers
 

More from SimoniShah6

JDBC Architecture and Drivers
JDBC Architecture and DriversJDBC Architecture and Drivers
JDBC Architecture and DriversSimoniShah6
 
Modulation Techniques
Modulation TechniquesModulation Techniques
Modulation TechniquesSimoniShah6
 
Top 10 Hadoop Shell Commands
Top 10 Hadoop Shell Commands Top 10 Hadoop Shell Commands
Top 10 Hadoop Shell Commands SimoniShah6
 
Phyics - introduction of biomaterials
Phyics - introduction of biomaterialsPhyics - introduction of biomaterials
Phyics - introduction of biomaterialsSimoniShah6
 
Java string , string buffer and wrapper class
Java string , string buffer and wrapper classJava string , string buffer and wrapper class
Java string , string buffer and wrapper classSimoniShah6
 

More from SimoniShah6 (6)

Mergesort
MergesortMergesort
Mergesort
 
JDBC Architecture and Drivers
JDBC Architecture and DriversJDBC Architecture and Drivers
JDBC Architecture and Drivers
 
Modulation Techniques
Modulation TechniquesModulation Techniques
Modulation Techniques
 
Top 10 Hadoop Shell Commands
Top 10 Hadoop Shell Commands Top 10 Hadoop Shell Commands
Top 10 Hadoop Shell Commands
 
Phyics - introduction of biomaterials
Phyics - introduction of biomaterialsPhyics - introduction of biomaterials
Phyics - introduction of biomaterials
 
Java string , string buffer and wrapper class
Java string , string buffer and wrapper classJava string , string buffer and wrapper class
Java string , string buffer and wrapper class
 

Recently uploaded

(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 

Recently uploaded (20)

(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 

Arrays and Pointers

  • 1. Subject : Computer Programing And Utilization (2110003) Topic Name: POINTERS AND ARRAYS
  • 2. OUTLINE  POINTERS  ARRAYS  POINTERS AND ARRAYS  ARRAY OF POINTERS
  • 3. POINTERS A POINTER IS A VARIABLE WHICH CONTAINS ADDRESS (IN MEMORY) OF ANOTHER VARIABLE. POINTERS ARE SYMBOLIC REPRESENTATION OF ADDRESS. WE CAN HAVE A POINTER TO ANY VARIABLE TYPE. IN OTHER WORDS , WE CAN TALK ABOUT ITS ADDRESS RATHER THAN ITS VALUE.
  • 4. ARRAYS AN ARRAY IS COLLECTION OF DATA ITEMS THOSE ARE OF SAME TYPES. AN ARRAY SIZE IS FIXED. IT CAN NOT BE CHANGED AFTER DECLARATION. THE ORDER OF THE ELEMENTS IS ALSO FIXED. EXAMPLE: A LIST OF TELEPHONE NUMBERS EXPRESSION a[4] REFERS TO THE 5TH ELEMENT OF ARRAY a
  • 5. POINTERS AND ARRAYS AN ARRAY NAME IS BASICALLY A CONST POINTER. YOU CAN USE THE [] OPERATOR WITH A POINTER; int *x; int a[10]; x = &a[2] ; x is “the address of a[2]”
  • 6. POINTERS AND ARRAYS FOR EXAMPLE :- int rollno[4]={100,101,102,103}; HERE BASE ADDRESS IS 5000, THEN FOUR ELEMENTS ARE STORED AS FOLLOWS: Array Element rollno[0] rollno[1] rollno[2] rollno[3] Value 100 101 102 103 Address 5000 5002 5004 5006 IF WE WRITE &rollno[0] , IT REFERS TO THE ADDRESS OF AN ARRAY rollno.
  • 7. POINTERS AND ARRAYS IF WE DEFINE int*p , THEN TO ASSIGN ADDRESS OF THE ARRAY, WE CAN WRITE :- p=rollno OR p=rollno[0]; Pointer Value Array Element Address Actual Value p &rollno[0] 5000 p++ or p+1 &rollno[1] 5002 p+2 &rollno[2] 5004 p+3 &rollno[3] 5006
  • 8. #include <stdio.h> int main () { double balance[5] = {1000.0, 2.0, 3.4, 17.0, 50.0}; double *p; int i; p = balance; printf( "Array values using pointern"); for ( i = 0; i < 5; i++ ) {printf("*(p + %d) : %fn", i, *(p + i) ); } printf( "Array values using balance as addressn"); for ( i = 0; i < 5; i++ ) { printf("*(balance + %d) : %fn", i, *(balance + i) ); } return 0; }
  • 9. When the above code is compiled and executed, it produces the following result − Array values using pointer *(p + 0) : 1000.000000 *(p + 1) : 2.000000 *(p + 2) : 3.400000 *(p + 3) : 17.000000 *(p + 4) : 50.000000 Array values using balance as address *(balance + 0) : 1000.000000 *(balance + 1) : 2.000000 *(balance + 2) : 3.400000 *(balance + 3) : 17.000000 *(balance + 4) : 50.000000
  • 10. ARRAYS OF POINTERS POINTERS CAN BE USED TO HANDLE TABLE OF STRINGS. WE CAN USE POINTER TO A STRING FOR FOLLOWING REASONS :- 1.ALL NAMES ARE ALMOSTLY NOT OF EQUAL LENGTH SO POINTER CAN BE USED FOR VARYING LENGTH. 2.MAKING FIXED SIZE ROW WASTES MEMORY.
  • 11. name[0] R A J 0 name[1] R A M K R I S H N A 0 HERE WE NEED ONLY 15 BYTES WITH POINTER ALLOCATION INSTEAD OF 40 BYTES WITH FIXED ALLOCATION.