Decimal To Binary Number Conversion In C Programming Tamil


#include<stdio.h>
#include<conio.h>
int con(int,int);
void main()
{
       int dec;
       clrscr();
       printf("\nENter the Decimal number :");
       scanf("%d",&dec);
       printf("\nBinary Value : %d",con(dec,1));
       getch();
}
int con(int n,int f)
{
	if(n!=0)
	{
		return (n%2)*f+(con(n/2,f*10));
	}
	else
	{
		return 0;
	}
}

Login To Download Source Code

Leave a Comment:

Login To Comment

List Of Programs


Goto Examples

Operators

Looping

Number Conversion

Pattern Design

Arrays

Matrix Examples

Sorting Examples

String Function

Change Case

String In C

Maths Functions

User Defined Functions

Recursive Functions

Pointer

Structure

File Concept

Calender Programming