how to return a multiple value from a function?
Answers were Sorted based on User's Feedback
Answer / krishna
You will have to use a structure or an array and then return
a pointer to the structure/array.
Is This Answer Correct ? | 3 Yes | 3 No |
# include<stdio.h> aaa() { printf("hi"); } bbb(){ printf("hello"); } ccc(){ printf("bye"); } main() { int (*ptr[3])(); ptr[0]=aaa; ptr[1]=bbb; ptr[2]=ccc; ptr[2](); }
programming in c lanugaue programm will errror error with two header file one as stdio.h and other one is conio.h
Implement a t9 mobile dictionary. (Give code with explanation )
1 Answers Amazon, Peak6, Yahoo,
What is the main difference between STRUCTURE and UNION?
main() { int i = 257; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }
#define f(g,g2) g##g2 main() { int var12=100; printf("%d",f(var,12)); }
main() { printf("%d", out); } int out=100;
void main() { int i=i++,j=j++,k=k++; printf(“%d%d%d”,i,j,k); }
what is the output of the below program & why ? #include<stdio.h> void main() { int a=10,b=20,c=30; printf("%d",scanf("%d%d%d",&a,&b,&c)); }
What is "far" and "near" pointers in "c"...?
Is the following code legal? struct a { int x; struct a b; }
main() { char * strA; char * strB = I am OK; memcpy( strA, strB, 6); } a. Runtime error. b. I am OK c. Compile error d. I am O