+ 2
Hello, i'm a beginner. Please be kind to my foolish question like " which one is the string here 42, 5.0, "hi evryone"?
6 Antworten
+ 2
int ( integer) mean the number which is not fractional value.
float or double mean the fractional number.
string meant one line of sentence. it can store any character ( letter, special characters, digit). for example
" it's time 10 O'Clock "
string should covered by double quotation( " " ) mark in c language.
where a single character should covered by single quotation mmark. for example
'a'
'b'
+ 6
hi everyone is the string…
42 is an integer
5.0 is a float…
integers are whole numbers and floats are decimals…
You can imagine a string as text, strings always habe quotes around them
+ 3
print(type(42))
print(type(5.0))
print(type("hi"))
https://www.sololearn.com/learning/1172
+ 3
Thanks. I get it now
+ 1
42 is an integer without quotations while "42" is a string.
+ 1
print("42"+"42")
will output 4242