Friday 20, April 2018
Welcome Guest, Register | Login  
      Home       Tutorials       Free Ebooks       Free Scripts       Tech News       Articles       About Us       Blog        Forum

  Convert decimal number to binary number in c

This c language program will input an integer in decimal numbers system and convert it to binary numbers system. Decimal to Binary Conversion, Convert from decimal to binary using c language.
Cut & Paste Script
#include <stdio.h>
 
int main()
{
  int n, c, k;
 
  printf("Enter an number\n");
  scanf("%d", &n);
 
  printf("%d in binary numbers system is:\n", n);
 
  for (c = 31; c >= 0; c--)
  {
    k = n >> c;
 
    if (k & 1)
      printf("1");
    else
      printf("0");
  }
 
  printf("\n");
 
  return 0;
}
   
     RELATED SCRIPTS
 
pointer and there uses in c
Example code for pointer and there uses in c language....more »
Category : C Programs Hits : 1972
   
C program to join two strings without using strcat
This c language program will join two strings without using strcat string function....more »
Category : C Programs Hits : 2258
   
concatenate two strings c language
Here is an example code to concatenate two strings using clanguage....more »
Category : C Programs Hits : 3332
   
C program to show memory address of array elements and access array elements using pointers
This program will visualize the memory address of each array element and will show you how to access array elements using pointer....more »
Category : C Programs Hits : 3170
   
Compare two strings using c
This program will input two strings and compare them. It will show both strings are equal, first string is greater than second or first string is less than second....more »
Category : C Programs Hits : 1700
   
   
SCRIPT CATEGORIES
 
  C Programs
C Programs scripts
  C++ Programs
C++ Programs scripts
  Java Programs
Java Programs scripts
  JavaScript Examples
JavaScript Examples scripts
  PHP Examples
PHP Examples scripts
  VBScript Examples
VBScript Examples scripts
 
 
 
POPULAR E-BOOKS
 
Download Marathon List Building Ebook Marathon List Building
   
Download 10 Mistakes We Make at Networking Events and How To Avoid Them Ebook 10 Mistakes We Make at Networking Events and How To Avoid Them
   
Download Road Pricing  Ebook Road Pricing
   
Download Wealthy Wal s Guide to Making Money Online Ebook Wealthy Wal s Guide to Making Money Online
   
Download The Art of Computer Game Design  Ebook The Art of Computer Game Design
   
Studiesinn.com 2018 All Rights Reserved.