top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What are the advantages of using array of pointers to string instead of an array of strings in C/C++?

+4 votes
1,286 views
What are the advantages of using array of pointers to string instead of an array of strings in C/C++?
posted Mar 29, 2016 by Mohammed Hussain

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

While sorting the strings, we need to swap only pointers instead of swapping the whole string which helps in efficient use of memory and time.When we have lot of data,this method should be preferred.
Follow this link for an example and more explanation-
http://ee.hawaii.edu/~tep/EE160/Book/chap9/section2.1.4.html

answer Mar 29, 2016 by Shivam Kumar Pandey
...