P200. WAP to design a function which returns 3 different types of data which are integer, string and float.
#include<stdio.h>
#include<stdlib.h>
struct
st
{
int i;
char ch;
float f;
};
struct
st data(void);
void
main()
{
struct st q;
q=data();
printf("%d %c %f
\n",q.i,q.ch,q.f);
}
struct
st data(void)
{
struct st v={10,'a',45.6};
return v;
}
Comments
Post a Comment