top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

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

+4 votes
627 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
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...