Take FREE!! Online Mettl Mock Test to Crack TechM and Other Companies Written Exams.
Get Off-Campus Placement Jobs Info !!!
TCS NQT Technical and Managerial Round Interview Questions

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