about void
-
tell me about void in c language
-
tell me about void in c language
you should be more specific. Generally, void is used in functions. 1)If the function does not return any value,ex:
void Print_Numbers (int i) { for (i;i<100;i++) cout< When you call the above function, you should send an integer parameter,say n, and the function will print the values from n to 1000. No return type is needed, that is, void will be set as a return value. 2)You can have the parameter also to be void instead of (i). In this case you should initialize the variable i inside the function. I hope this is what are you looking for,
-
you should be more specific. Generally, void is used in functions. 1)If the function does not return any value,ex:
void Print_Numbers (int i) { for (i;i<100;i++) cout< When you call the above function, you should send an integer parameter,say n, and the function will print the values from n to 1000. No return type is needed, that is, void will be set as a return value. 2)You can have the parameter also to be void instead of (i). In this case you should initialize the variable i inside the function. I hope this is what are you looking for,
thanks for ur response.... but i need significance of "void"
-
thanks for ur response.... but i need significance of "void"
:~ void (C++)[^] Fundamental Types[^]
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
-
tell me about void in c language
Void: The total absents of anything. 1) If void it the return type, then the function returns nothing. 2) If void is an argument to a function, then the function takes no arguments. 3) If you convert a pointer to a variable to a pointer to void, it means that only you (normally) know what type it origanaly was. Very handy for passing around indirect references (pointers) to types, but dangrous if the reciever converts it to a variable type other than the original type. By the way most modern operating systems depend on this ability, because message passing requires the ability to pass references (actually indirect references) around. It is that simple.
INTP "Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra