Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren+ 9
Can we use char main, string main instead of int main and void main?? If so what is the return type?
7 Antworten
+ 6
i mean return value?
+ 6
Either you return something as int type or return void.
No char, no string, nothing else.
+ 6
most commonly used are int and void
if we use char ,string the return values should be specific and it might create errors as well...
but u can create some functions names for your purposes
+ 2
The return value can be anything as long as its the same type as the return type.
0
No you cant use char or string.
You said the return type in the question. 😜
Ex/
char main()
char IS the return type.
int main.
int is the return type.
void main.
void is the return type.
etc..
0
you might use it as a function and it will return char as if you use it like char main()
0
Idk