ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
How can I return multiple values from a function?
 Question Submitted By :: Tribhuvan Sharma
I also faced this Question!!     Rank Answer Posted By  
 
  Re: How can I return multiple values from a function?
Answer
# 1
by using the function call by reference with the multiple
returns
 
Is This Answer Correct ?    1 Yes 0 No
Phani Kumar S
 
  Re: How can I return multiple values from a function?
Answer
# 2
use of pointers.
call by refrance.
 
Is This Answer Correct ?    1 Yes 0 No
Shruti
 
 
 
  Re: How can I return multiple values from a function?
Answer
# 3
if we want to retrive  multiple values from functions 
derive multiple arguments in the defition of functions
 
Is This Answer Correct ?    0 Yes 0 No
Phani Kumar
 
  Re: How can I return multiple values from a function?
Answer
# 4
we can indirectly return multiple values from a function through pointers...... 

what ever you make the alterations in the sub-routine since pointers refer to address the value will be directly gets changed in the actual address
 
Is This Answer Correct ?    0 Yes 0 No
Vignesh1988i
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
If we give two names then this displays the connection between the two people. It is nothing but flames game  1
How the C program can be compiled? HP7
write a C program to print the program itself ?! TCS11
Function to find the given number is a power of 2 or not? Motorola12
a memory of 20 bytes is allocated to a string declared as char *s then the following two statements are executed: s="Etrance" l=strlen(s); what is the value of l ? a.20 b.8 c.9 d.21 TCS4
How can I implement opaque (abstract) data types in C? What's the difference between these two declarations? struct x1 { ... }; typedef struct { ... } x2;  2
Write a program to generate prime factors of a given integer?  3
program for comparing 2 strings without strcmp()  3
What's wrong with "char *p = malloc(10);" ?  4
I have an array of 100 elements. Each element contains some text. i want to: append a star character to the end of every fifth element remove every second character from every tenth element, and… add a line feed (ascii 10) after the 30th character of every array element whose length is greater than 30 characters.  1
#ifdef TRUE int I=0; #endif main() { int j=0; printf("%d %d\n",i,j); } ADITI2
what is compiler  5
what are the languages used in c#? Infosys1
What are volatile variables?  1
what is data structure  4
write a program for even numbers?  8
what is the output of the following program? main() { int i=-1,j=-1,k=0,l=2,m; m=i++&&j++&&k++||l++; printf("%d %d %d %d %d",i,j,k,l,m); }  7
which of the following statements is incorrect a.typedef struct new{ int n1; char n2; } DATA; b.typedef struct { int n3; char *n4; }ICE; c.typedef union { int n5; float n6; } UDT; d.#typedef union { int n7; float n8; } TUDAT; TCS5
what is call by value and call by reference  2
Print the foll in C...eg when n=5 the o/p must b + + + + + + + + + + + + + + + + +  1
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com