If the purpose of the function is to create a string and assign the string to a variable, would the function be declared as string functionName () ? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 1

If the purpose of the function is to create a string and assign the string to a variable, would the function be declared as string functionName () ?

16th Jul 2016, 8:36 AM
Marco Cesar Saenz
Marco Cesar Saenz - avatar
1 Antwort
+ 1
The function would probably be declared as void functionName() , because the function would be declared with void regardless of the parameter being string or int or float.
21st Jul 2016, 2:37 PM
Saurabh
Saurabh - avatar