GATE (Graduate Aptitude Test in Engineering) Computer Science & IT (CS) Programming and Data Structures-Arrays Study Material (Page 3 of 4)
Choose Programs:
🎓 Study Material (1190 Notes): 2024-2025 Syllabus
Rs. 1000.00 -OR-
3 Year Validity (Multiple Devices)
Topic-wise Notes & SampleDetails
🎯 302 Numeric, 2894 MCQs (& PYQs) with Full Explanations (2024-2025 Exam)
Rs. 650.00 -OR-
3 Year Validity (Multiple Devices)
CoverageDetailsSample Explanation
Help me Choose & Register (Watch Video) Already Subscribed?
String: Initialization is Not Straightforward
Another problem with C type strings is that it is not easy to initialize strings by other strings. For example, following statements are not acceptable in C type string case. Both are examples of initialization possible to be done for other types of variables. Initialization defines a new string with a value of an already defined string. Following statements are possible with string objects.
string Player1.PNm ( Player2.PNm )
string Player1.P…
… (1087 more words) …
Subscribe (by clicking here) to view full notes and track progress.
Strings: Finding a Character or a Substring
- The generic algorithm (a non-member function) , find () is quite useful in many ways with many STL objects, so as strings. However, string also has a member function which is also called find () . The member function find () is used to find the location of a character or a substring in a given string. Find takes the string under consideration as the calling object and the substr…
… (761 more words) …
Subscribe (by clicking here) to view full notes and track progress.