Is it right to say that....since arrays are passed by address there's no need and reason to return arrays from functions(Is that the reason why it is not allowed in c/c++)

there is a need and a reason to return arrays and it can be done, you just return a pointer to its first address. If what you meant was an array return by value, i.e. a copy of the array then yes this never happens in c++. arrays are always treated as reference types.They are not copied into funcs or out of them.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.