0

Isn't strings and floats the same things

13th Apr 2020, 1:42 PM
Milkiyas
Milkiyas - avatar
3 ответов
+ 5
Hi. Strings and floats are completely different. 1.Strings are sequences of symbols, floats are numeric variables. 2. Strings can have any size you need. Floats can store numbers with no more precision then defined by language 3. The same operations on strings and floats work differently. As example If you add one string to another you get composed sequence ("123"+"123"="123123"). But addition of floats produces arithmetic addition (123.0+123.0=246.0)
13th Apr 2020, 1:52 PM
Stephan
Stephan - avatar
+ 4
They are completely different like land and sky Floats are decimal numbers simply Eg. 3.14 And strings are sequence of letters or characters enclosed in double quotes Eg. "How are you"
13th Apr 2020, 1:50 PM
Farhan
Farhan - avatar
+ 1
.
16th Apr 2020, 5:43 PM
Fatima Lmasri
Fatima Lmasri - avatar