Blogger Tips And Tricks|Latest Tips For Bloggers Free Backlinks

Thursday, 15 November 2012

Write a program to Bit toggle the given number using in C language examples?

Bit toggle,program to bit toggle,C bit toggle,bit toggle the number,bit toggle the given number,C program to bit toggle,bit toggle program in C,bit toggle in C,Write a program to Bit toggle the given number using in C language,C program to bit toggle the given number


  Bit toggle

         The program is for the Bit toggle.
                  #include<stdio.h>
                  main()
                  {
                           int n,pos;

                           printf("Enter numbers\n");
                           scanf("%d %d",&n,&pos);

                             n=n^(1<<pos);

                            printf("After bit toggling : %d\n",n);
                  }

    Output:
                     Enter numbers
                          6
                          8 
                     After bit toggling 262


2 comments:

  1. Thank you. If you have interest to work with acccnture, then apply through the following link as soon as possible
    accenture jobs for freshers in bangalore

    ReplyDelete
  2. c++ language programming sample codes to write programs
    cplusplus code Binary Search Tree

    ReplyDelete