Skip to content

13. Strings

Madhav Anand edited this page Nov 15, 2020 · 2 revisions
Character Array String Array
Static: Need to know the size beforehand Dynamic: No Need know the size beforehand
Hard and Larger size required for performing operations like concatenation, append etc. Performing Operations like concatenation and append is easier
Don't terminate with special character '\0' Automatically terminate with special character '\0'

Official Notes Link

  1. String Challenges

Key points

  1. Strings can be thought of elder brother of Character Arrays.
  2. Header file for Strings: #include<string>
  3. Comment on string str: string is keyword and str is identifier.
  4. Is string a datatype ? While using it, we can think of datatype but it is a class.
  5. How to take multi-line input in string. getline(cin,{stringName}) & cin.ignore();
  6. How Multi-line Input works ? Click Here
  7. Header file for Sort: #include<algorithm>

Functions

Pending

  • Frequent Character - Case: Multiple Char frequent
  • How Multi-line String Input
  • String Comparison Function Working
  • String Compression
  • String is a Class

Clone this wiki locally