c programming examples


  c programming with real time examples step by step illustrated by venkatachalapathi
to understand by every user. where you can learn much faster.

#include<stdio.h>
void main()
{
int a = 10, b = 20, c;
printf("\nOriginal Values of a = %d, b = %d", a, b);
c = a;
a = b;
b = c;
printf("\nSwapped Values of a = %d, b = %d", a, b);
}

#include<stdio.h>
void main()
{
int a = 10, b = 20;
printf("\nOriginal Values of a = %d, b = %d", a, b);
a = a ^ b;
b = a ^ b;
a = a ^ b;
printf("\nSwapped Values of a = %d, b = %d", a, b);
}

No comments: