Data type of a function which returns multiple types? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Data type of a function which returns multiple types?

Hi! What should be the correct data type for the `someFunc` function in my following code (Note that the format in printf function is also missing). https://code.sololearn.com/cxItqChiX7iV/#c I have searched a lot over the internet, and I have discovered that some users on stack overflow suggested to use union and struct. But, I am hearing these terms for the first time and don't know how to use them. Can you guys help me?

3rd Sep 2018, 6:48 AM
777
777 - avatar
4 Answers
+ 2
Tind yup... I missed it as c language...
3rd Sep 2018, 7:50 AM
Ketan Lalcheta
Ketan Lalcheta - avatar
+ 2
@Ketan Lalcheta Thanks for your help, but I can't open the link because I'm on the website.
23rd Dec 2018, 4:49 AM
777
777 - avatar
+ 1
Rahul you should have function template
3rd Sep 2018, 7:47 AM
Ketan Lalcheta
Ketan Lalcheta - avatar
0
Rahul just got update in c courses... you might like to go through below lecture : https://www.sololearn.com/learn/8159/?ref=app
3rd Sep 2018, 6:31 PM
Ketan Lalcheta
Ketan Lalcheta - avatar