UrbanPro

Take BTech Tuition from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

We have as unsigned character like obff and I want program to count no of 1s occur in that character.

Asked by Last Modified  

Follow 0
Answer

Please enter your answer

BEST Technical Trainer & Freelancer

Rotate right or left 8 times thriugh carry and check the flag each time...
Comments

JAVA CLASSES IN BANGALORE

Contact me.
Comments

Programmer

Write a if condition that checks the every index of the string with 1. If the condition is true then increase the count variable value by one. Count variable must declared at the beginning of the program itself.
Comments

Programmer

Write a if condition that checks each and every index of string with 1 until u reach null termination . If the condition is true then increase the value of count variable by one. Count variable must be declared at the beginning of the program. At last print the count variable. That's it. Have fun with...
read more
Write a if condition that checks each and every index of string with 1 until u reach null termination . If the condition is true then increase the value of count variable by one. Count variable must be declared at the beginning of the program. At last print the count variable. That's it. Have fun with programs. read less
Comments

Programming Guru

You can make a loop attached with a counter and shift right each time. loop testing condition should be (obff!=0). and with the help of count variable you can count number of one's.
Comments

Software Development Professional

unsigned int v; // count the number of bits set in v unsigned int c; // c accumulates the total bits set in v for (c = 0; v; v >>= 1) { c += v & 1; } The naive approach requires one iteration per bit, until no more bits are set. So on a 32-bit word with only the high set, it will go through...
read more
unsigned int v; // count the number of bits set in v unsigned int c; // c accumulates the total bits set in v for (c = 0; v; v >>= 1) { c += v & 1; } The naive approach requires one iteration per bit, until no more bits are set. So on a 32-bit word with only the high set, it will go through 32 iterations. Let me know if you need more detailed explaination. read less
Comments

SUDHIR SHARMA - Computer Trainer based On Delhi

Dear Siddhant, I am sending a link that can help you to understand the link please open and try to learn, if is there any problem must reply me.. and don't confuse in unsigned int and unsigned char.. you can(put) unsigned char instead of unsigned int..
Comments

View 5 more Answers

Related Questions

Would it be good for me if i do masters from abroad(maybe canada) after doing btech in cs from CCET chandigarh(comes under PUNJAB UNIVERSITY)?What would be the scope for my career after graduating?
It is always good to do masters in Canada after doing your B.Tech in CSE from CCET Chandigarh.Reason:The cost of education is much cheaper in Canada compared with that of US universities.You will get good...
Nitin
what is frequency division multiplexing
Frequency-division multiplexing (FDM) is a scheme in which numerous signals are combined for transmission on a single communications line or channel. Each signal is assigned a different frequency (subchannel) within the main channel.
Mohd
I am Student of AMIE,and I am also doing PGDHSE.Is it good or me have to drop one ?
You should concentrate on any one & achieve full marks instead of doing both with less marks.
Neeraj
0 0
7
I m a student pursuing b.tech in c.s.e. I don't have a great command on neither c nor cpp. As my second year will be starting soon I want to ask whether I should start preparing for second-year courses or first get command on the basic languages?
First, get good command on all the basic concepts of programming. I would suggest you start with the C programming language which will help you build the foundation for learning other programming languages...
Hitesh

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

Prime Numbers
A prime number is the positive integer. (Besides ) which is divisible by 1 and itself. Examples: 2, 3, 5, 7, 11, 13, 17, 23, 29 etc. A number which is not prime is called a composite...
M

Mohit S.

1 0
0

Difference between System Software and Application Software
The software is the virtual component of the computer through which we are doing our work. The software is classified as System software and Application Software. System Software provides the platform...

Binary and Complete Binary Tree
Binary Tree - In a binary tree, every node except leaf node contains almost two children. - if every internal node contains precisely two children, then it is called 2-array binary tree. - leaves = Internal...

What Is The Difference Between AutoCAD And SolidWorks?
AutoCAD is a commercial computer-aided design (CAD) and drafting software application. Developed and marketed by Autodesk. AutoCAD is a 2-D and 3-D computer-aided drafting software application used in...

Bhola Patel

0 0
0

What Is Mean Stack? Why Mean Stack Is Popular Now?
Mean Stack is standing for MongoDB, ExpressJS, AngularJS and NodeJS. These four javascript solutions create a high performing web application. Mainly JavaScript is the frontend language. It’s working...

Recommended Articles

MBA, Medicine and engineering are the three main professional courses in India. Engineering is still one of the highly sorted after professional courses in the under graduate level, while MBA is favoured as a preferred post graduate course. To shine in these courses, one needs to work and study hard. Engineering as a...

Read full article >

According to a recent survey conducted by the NCAER (National Council of Advanced Economic Research), engineering is the most sought after course in India. Some engineering courses are offered as BE or Bachelor of Engineering while some as Bachelor in Technology or B.Tech. Since engineering is a professional course, the...

Read full article >

Once over with the tenth board exams, a heavy percentage of students remain confused between the three academic streams they have to choose from - science, arts or commerce. Some are confident enough to take a call on this much in advance. But there is no worry if as a student you take time to make choice between - science,...

Read full article >

E-learning is not just about delivering lessons online. It has a much broader scope that goes beyond manual paper or PowerPoint Presentations. To understand the reach of E-learning and how the whole process works in developing the Educational system, we will discuss a few points here. Let us find out how this new learning...

Read full article >

Looking for BTech Tuition ?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for BTech Tuition Classes?

The best tutors for BTech Tuition Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Take BTech Tuition with the Best Tutors

The best Tutors for BTech Tuition Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more