1.write a function swap(a,b) which interchanges 2 integers .call the function from the sort() funt whenever two integers have to be interchanged.2. write a c program to add the diagonal elements of an 3x3 array.3.write a function called max(a,b,c) that finds the bigger of 2 nos a and b and stores it in the address of the int variable passed as the third argument.

Showing Answers 1 - 1 of 1 Answers

Geek

  • Feb 22nd, 2007
 

void swap(int *a, int *b) {
    int temp = *a;
    *a = *b;
    *b = temp;
}

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions