Wrox Programmer Forums
|
C++ Programming General discussions for the C++ language. For questions specific to Microsoft's Visual C++ variant, see the Visual C++ forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C++ Programming section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old October 17th, 2007, 03:43 PM
Registered User
 
Join Date: Sep 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Please give me solution

Hi! friends
Please give me solution of this object
create a function invert(int x,int y,int n)
with n bits.That began at position inverted p.
you have to assume that x,p,n are integer and function will return an integer.
Ex.if x=181 in decimal , which is 10110101 in binary. and p=4, n=2.
then function will return 10101101 in binary and 173 in decimal.
the underlined bits are managed bits.
note that bit position counted from right to keft that count start with zero. therefore position 4 is fifth bit from right value.

Deepak Singh
Reply With Quote
  #2 (permalink)  
Old October 17th, 2007, 04:27 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

How about you make your own homework??

Looks like you didn't learn much from last time even though you were sooooo sorry.....

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
give me solution asudhakar ASP.NET 1.0 and 1.1 Basics 2 March 19th, 2007 09:33 AM
Please give me the solution to my example. vijaykumartaduri General .NET 4 March 7th, 2007 11:41 PM
hi expert! Can u give me solution for this???? jasdeephere ASP.NET 1.0 and 1.1 Professional 1 February 10th, 2007 02:16 AM
What is wrong in following code?Give me solution [email protected] Pro VB.NET 2002/2003 1 September 19th, 2006 04:49 PM
CROSS_TAB,,, RTL problem, Plz Give me solution raza_mrk36 Crystal Reports 0 April 4th, 2006 02:33 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.