Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Write a program using bitwise operators to invert even bits of
a given number.

Answer Posted / ayaskanta

Use Xor operation. Xor ing with 1 coverts a 0 to 1 and a 1
to zero...

Is This Answer Correct ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

 write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare.  You will then tabulate this information in another file.

2176


What is the method to save data in stack data structure type?

1056


What does volatile do?

961


What are loops in c?

973


Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?

1050


write a c program to print the next of a particular no without using the arithmetic operator or looping statements?

3890


What is 1f in c?

2603


What are the preprocessor categories?

1018


How do you list a file’s date and time?

1041


What is malloc return c?

990


How many identifiers are there in c?

985


What is a good data structure to use for storing lines of text?

1055


Explain what is a 'locale'?

1035


can we change the default calling convention in c if yes than how.........?

2495


.find the output of the following program? char*myfunc(char*ptr) { ptr +=3; return (ptr); } int main() { char*x,*y; x="HELLO"; y=myfunc(x); printf("y = %s ",y); return 0; }

2539