Aug 27, 2003 #1 mimi17 Programmer Aug 27, 2003 1 US Is it possible by not using pointers more than one values could be returned in main function?
Aug 27, 2003 #2 Salem Programmer Apr 29, 2003 2,455 GB You can use a structure to return multiple values Code: struct foo { int a; char b; }; struct foo func ( ) { struct foo result = { 1, '2' }; return result; } int main ( ) { struct foo bar = func(); return 0; } Upvote 0 Downvote
You can use a structure to return multiple values Code: struct foo { int a; char b; }; struct foo func ( ) { struct foo result = { 1, '2' }; return result; } int main ( ) { struct foo bar = func(); return 0; }