C Programming - Functions - Discussion
Discussion Forum : Functions - Find Output of Program (Q.No. 12)
12.
What will be the output of the program?
#include<stdio.h>
int addmult(int ii, int jj)
{
int kk, ll;
kk = ii + jj;
ll = ii * jj;
return (kk, ll);
}
int main()
{
int i=3, j=4, k, l;
k = addmult(i, j);
l = addmult(i, j);
printf("%d %d\n", k, l);
return 0;
}
Discussion:
91 comments Page 9 of 10.
Priya said:
7 years ago
Can anyone explain this program?
Please.
Please.
KARTHIK said:
10 years ago
RETURN always return the rightmost value.
Pradeepa said:
1 decade ago
12 12 how it is possible please help me?
Rohan someshetty said:
8 years ago
Thanks for the explanation @Sundar.
Pradip said:
9 years ago
Return cannot take two arguments.
Abhishek Gaurav said:
9 years ago
Thank you very much @Sundar.
R.K said:
9 years ago
Well said @Sundar. Thankyou.
Madhuri said:
9 years ago
Well explained. @Rahul.
Ketaki said:
8 years ago
The answer is 12.
Jay said:
1 decade ago
Thanks sundar.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers