Knowee
Questions
Features
Study Tools

#include"stdio.h"int fun1(int ,int );void main(){int a=10,b=20,sum,z=5;z=fun1(a,b);printf("x=%d y=%d\n",a,b);printf("z=%d\n",z++);}int fun1(int a,int b){a=a+b;b=a+b;int sum=a+b;printf("a=%d b=%d sum=%d\n",a,b,sum);return sum;}(i) What value of x and y will be displayed?(ii) What value of z will be displayed

Question

#include"stdio.h"int fun1(int ,int );void main(){int a=10,b=20,sum,z=5;z=fun1(a,b);printf("x=%d y=%d\n",a,b);printf("z=%d\n",z++);}int fun1(int a,int b){a=a+b;b=a+b;int sum=a+b;printf("a=%d b=%d sum=%d\n",a,b,sum);return sum;}(i) What value of x and y will be displayed?(ii) What value of z will be displayed

🧐 Not the exact question you are looking for?Go ask a question

Solution

(i) The value of x and y that will be displayed is: x=10 y=20

(ii) The value of z that will be displayed is: 6

Similar Questions

0/0

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.