492 views

1 Answer

0 votes
0 votes

I think it is pretty straightforward.

int* functionName (int, int, float);

accepting the 2 integer and float parameters are self explanatory.

returning an array of integers can be accomplished by returning a pointer to the array.

But make sure the pointer which the function return is pointing to some array which is NOT declared in the local scope of this function. If it is so then the returned value may not point to the expected location.

Related questions

0 votes
0 votes
1 answer
1
Psnjit asked Jan 12, 2019
1,177 views
main(){unsigned int i= 255;char *p= &i;int j= *p;printf("%d\n", j);unsigned int k= *p;printf("%d", k);} Both the outputs are -1. I have even tried with - int i = 255(3rd ...
3 votes
3 votes
2 answers
2
Shamim Ahmed asked Dec 11, 2018
595 views
char *a = “MADEEASY”;char *b = “GATECSIT2019”;char *r = a;char *s = b;printf(“%d”, (int) strlen (b+3[r] – 1[s]));return 0; Whats the output? Answer given 8
0 votes
0 votes
1 answer
3
Mr khan 3 asked Nov 3, 2018
1,040 views
#include<stdio.h void fun(int *p,int *q) { p=q; *p=q; } int i=0,j=1; int main() { fun(&i,&j); printf("%d%d",i,j); }What will be the output of i and j in 16-bit C Compiler...