+ 1
The use of void function is easy than in the place of class and object???
The use of class and object is complicated .so, in the place of class and object can we use void function ,it is easy than class and object
7 Réponses
+ 2
Class and objects is a part of object oriented programming . which provides a lots of functionality like data abstraction data hiding and much more but these things you can not do in c you can not hide your data . So dont compare with function to class .
What actually you want to achieve with void function.
+ 1
A.S. so, we can't use data abstraction and data hiding etc without class ??
+ 1
Shruti Shukla no only class providing these concepts . First learn basics of function then structure . Structure is similar to class but structure have some limitations then move to oops you will understood much better but first you should start you can learn c or cpp
+ 1
Rishi Im talking about values nothing more
0
Through class u can contruct or return something and through void u can return anything
To be very honest
U can't skip
Try a real world app or problem u will get my point
Like when you going to learn flutter the whole framework is depends on widget - object
And classes
0
Manvendra Yadav 😒
We can't return anything using void as the return type. Maybe you're talking about returning a void pointer. Then yeah, we can return any type of pointer using a void pointer as the return type. but still, you can only return any type of pointers, not "anything" ;)