I have a question related to function without return statement at the end of definition. How it works? It can return something becouse the value to return is allocated on the stack with random number when we call the func? Check the example below:
#include <iostream>
using namespace std;
int fun1(){
cout << "Fun1" << endl;
}
char fun2(){
cout << "Fun2" << endl;
}
short fun3(){
cout << "Fun3" << endl;
}
float fun4(){
cout << "Fun4" << endl;
}
double fun5(){
cout << "Fun5" << endl;
}
int main()
{
cout << fun1() << " " << endl;
cout << fun2() << " " << endl;
cout << fun3() << " " << endl;
cout << fun4() << " " << endl;
cout << fun5() << " " << endl;
}