Take FREE!! Online Cocubes Mock Test to Crack various Companies Written Exams.
Get Off-Campus Placement Jobs Info !!!
Take 30+ FREE!! Online Arithmetic Aptitude Mock test to crack any Exams.

Technical Discussion :: C

7. Write a program that returns 3 numbers from a function using a structure.

Answer:

#include<stdio.h>

struct name{

int a;

int b;

int c;

};

struct name func(){

    struct name s1 ;

s1.a=1;

s1.b=2;

s1.c=3;

return s1;

}

int main(){

    struct name val = func();

}

Asked In :: Sopra Steria

Post Your Answer Here:

Name *
Email
Alert me

Post Your Reply Here:

Report Error

Please Login First Click Here

Post Your Reply Here:

Report Error

Please Login First Click Here