C Program to Accept two Integers and Check if they are Equal:
C Program to Read Two Integers M and N & Swap their Values:
This is a C program to read two integers & swap their values.
Problem Description
This program reads two integers & swaps their values.
Problem Solution
Take two integers as input.
Use a function for swapping process.
Exchange the values using another variable.
Print the output and exit.
Program/Source Code
/*
* C program to read two integers M and N and to swap their values.
* Use a user-defined function for swapping. Output the values of M
* and N before and after swapping.
*/
#include
void swap(float *ptr1, float *ptr2);
void main()
{
float m, n; Show More
All Chapters — C programming
Similar Questions
From C Programs on integers · C programming
C Program to Compute the Sum of Digits in a given Integer:
C Program to Check if a given Integer is Positive or Negative:
C Program to Calculate the Sum of Odd & Even Numbers:
.C Program to Find the Number of Integers Divisible by 5 in a given range:
C Program to Check if a given Integer is Odd or Even: