How to declare string | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson

How to declare string

Please help me

20th Apr 2021, 1:35 PM
Daniel Koroma
Daniel Koroma - avatar
4 Answers
20th Apr 2021, 1:46 PM
你知道規則,我也是 - avatar
+ 2
I see you are using C# so in C# you define a string like this : string foo = “something” , you should use double quotes for declaring a string in C#
21st Apr 2021, 12:18 AM
In python String can be defined by different ways, like X='hello world' x=str(hello world) These both are strings, print(X) print(x) Will #output hello world hello world
22nd Apr 2021, 11:58 AM
Javed Ullah
Javed Ullah - avatar
- 1
There have a lot of programming language. And declare a string in a variable is defferant in those languages. But declaring just a string is same all over those languages. Just put string in double quotes or in single quotes will declare a string.
22nd Apr 2021, 1:26 PM
MinhAj RahmAn
MinhAj RahmAn - avatar