0

Are strings var?

Iā€™m confused about strings. Iā€™ve read what the strings are, but Iā€™m still wondering what they are exactly and what they are for. Can someone explain it to me in a simpler way? I do have a hard time learning and comprehension as I have dyslexia and dysnomia. (I canā€™t spell well)

6th Aug 2021, 3:31 AM
Leah Dykema
Leah Dykema - avatar
5 Answers
+ 5
computers can just store one byte at a time ..so in one byte just a single character can be stored ..(like 'a', 'd','z','&' etc...) but thats of no use if we want to display user a message ..there comes strings .. string is nothing but a contiguously stores characters in memory .. so exaplmple of string is "nobita", "doraemon" etc...
6th Aug 2021, 3:45 AM
Prashanth Kumar
Prashanth Kumar - avatar
+ 2
Calvin Thomas In Swift code
6th Aug 2021, 7:43 PM
Leah Dykema
Leah Dykema - avatar
+ 1
In which language? In C, strings are mere char arrays while in Python, strings are objects.
6th Aug 2021, 7:41 PM
Calvin Thomas
Calvin Thomas - avatar
+ 1
Leah Dykema In Swift, strings are objects which contain information such as string length, the string contents (character array), etc. Basically, a group of consecutive characters as an array represents the whole string.
6th Aug 2021, 7:54 PM
Calvin Thomas
Calvin Thomas - avatar
+ 1
Calvin Thomas thank you!
6th Aug 2021, 7:54 PM
Leah Dykema
Leah Dykema - avatar