[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.
Technical Discussion :: C
Home > Technical Interview Q&A > C > Discussion

30 / 123

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:


Rate This: +1 -0      +
Report    

Post Your Reply Here:

Alert me
q4i-reply-your-answer

Report Error

Please Login First Click Here

Rate This: +0 -0     
Report    

Post Your Reply Here:

Alert me
q4i-reply-your-answer

Report Error

Please Login First Click Here

Most Popular Qs.