0

Can I create a user defined function for swapping two numbers, and function with argument and return ?

function should have argument as well as return type int swap(int a,int b){ int temp; temp=a; a=b; b=temp; return a,b; } void main(){ int a=45,b=55; swap(a,b); }

21st Aug 2020, 8:24 PM
Deepak Dhan
Deepak Dhan - avatar
1 Answer
+ 2
Hello Deepak Dhan Where's yours attempt? No one is gonna write a full working code for you. You've to show us your attempt even if its wrong and we can figure it out together.
21st Aug 2020, 8:42 PM
minirkk
minirkk - avatar