Posts

Showing posts from December, 2020

Swap Two Numbers in C

  Swap Two Numbers in C In this example, you will learn to swap two numbers in C programming using two different techniques. To understand this example, you should have the knowledge of the following C programming topics: C Data Types C Programming Operators C Input Output (I/O) Swap Numbers Using Temporary Variable # include <stdio.h> int main () { double first, second, temp; printf ( "Enter first number: " ); scanf ( "%lf" , &first); printf ( "Enter second number: " ); scanf ( "%lf" , &second); // Value of first is assigned to temp temp = first; // Value of second is assigned to first first = second; // Value of temp (initial value of first) is assigned to second second = temp; printf ( "\nAfter swapping, firstNumber = %.2lf\n" , first); printf ( "After swapping, secondNumber = %.2lf" , second); return 0 ; } Output ...

Binary to Decimal Converter Program in C Language

Image
Binary to Decimal Converter Program in C Language :

Addition of two negative integers without '+' operator in c

Image
Addition of two negative integers without '+' operator in  C :

Addition of two integers without '+' operator in c

Image
Addition of two integers without '+' operator in c :

Addition of two numbers half adder login code in c

Image
Addition of two numbers half adder login code in c language :

2D array print using two nested loop in c

Image
2D array print using two nested loop in c :

1D array print using for loop in c

Image
1D array print using for loop in c :

ANSI-Color-Code in c language

Image
ANSI-Color-Code in c language :

3D array print using three nested loops.c

Image
3D array print using three nested loops in c :