Write a program to interchange content of C and B variables. input values for these variables through keywords.

Write a program to interchange content of C and B variables. input values for these variables through keywords.


In this program, we will interchange the value of two variables. In c language.

This Post Content:-

  • Algorithm

  • Flowchart

  • C code

  • Output

  • Pdf notes


  • Algorithm

Step 1:- start.

Step 2:- declare the variable a, b, and c .

Step 3:- get the input for the variable a and b.

Step 4:- interchange the value of a and b, By using:-

c=a;

a=b;

b=c;

Step 4:- print a and b.

Step 5:- end.

  • flowchart



  • C code:-


Output:-
Try it yourself:- online c compiler


Comments

Popular posts from this blog

Develop a program to print values of variable and their addresses.

Develop a c program to find the sum of all elements stored in a given array using a pointer.