0 votes
in C Plus Plus by
What do you mean by ‘void’ return type?

1 Answer

0 votes
by
All functions should return a value as per the general syntax.

However, in case, if we don't want a function to return any value, we use “void” to indicate that. This means that we use “void” to indicate that the function has no return value or it returns “void”.

Example:

void myfunc()

{

                         Cout<<”Hello,This is my function!!”;

}

int main()

{

myfunc();

return 0;

}

Related questions

0 votes
asked Dec 21, 2023 in C Plus Plus by GeorgeBell
0 votes
asked Nov 15, 2020 in JAVA by rajeshsharma
...