+ 1

What happens if a string is multiplird by 0(zero)?

21st Dec 2018, 1:10 PM
Y.T.Rupa Sree
Y.T.Rupa Sree - avatar
3 Respostas
+ 9
Just mention the language you are talking about. It would be easier for others to understand your question. If you are talking about Python, then you won't get any output as str = "Hello" print(0*str) #outputs nothing So you won't get any output as the there is no string to print
21st Dec 2018, 1:17 PM
Nova
Nova - avatar
+ 5
There will be 'No output'
21st Dec 2018, 1:17 PM
Muhd Khairul Amirin
Muhd Khairul Amirin - avatar
+ 4
Strictly spoken, in Python, if you multiply any str by 0, you get a str of zero length.
21st Dec 2018, 1:31 PM
HonFu
HonFu - avatar