bubble sort program in c without using temporary variable/third variable?
Take a look at https://www.codesdope.com/blog/article/sorting-an-array-using-bubble-sort-in-c/
Edit
Swapping two variables without using the third one:
#include <stdio.h>
int main()
{
int x = 10, y = 15;
x = y-x; // x is changed
y = y-x; // value of y is change to initial value of x.
/*
Let's say initial value of x to be X
y=y-x => y=y-(y-X) => y=X
y is changed to initial value of x
Let's say initial value of y to be Y
Now, x(new value) = Y-X
y(new Value) = X
x+y = Y-X+X = Y
*/
x = x+y;
printf("x = %d\ny = %d\n",x,y);
return 0;
}