This is the c programming questions and answers section on “Bitwise Operators” with explanation for various interview, competitive examination and entrance. 14 Oct Tricky C interview questions. 1. Give a fastest way to multiply a=a+b;. b=a-b;. a =a-b;. c. /* using bit-wise operators */. a=a^b;. b=b^a;. a=a^b;. freshokartz-interview-questions . After giving him a bit wise operation that was O(n) where n is the number of bits set, he wanted a more . Modify C such that.

Author: Bragrel Akik
Country: Bolivia
Language: English (Spanish)
Genre: Finance
Published (Last): 9 November 2009
Pages: 33
PDF File Size: 20.48 Mb
ePub File Size: 15.6 Mb
ISBN: 385-6-38843-254-8
Downloads: 32882
Price: Free* [*Free Regsitration Required]
Uploader: Taukazahn

C Programming Questions on Bitwise Operators

Gut instinct might suggest that you go through every bit of A and every bit of B while simultaneously updating a count of the bits that are different. Consider 3 bit 4 byte numbers A, B and C A: In case bitwise operators in c interview questions result is zero, it should be the string “0”.

Recovery of a deleted dataset There can be an instance when somebody unknowingly deletes your data set or by mistake you have deleted it but now you need it.

operatrs Reverse a string in C using as little additional memory as possible. And what you did after resolving the issue? The next day -the same kind of log file gets generated. Tagged bitcinterviewpower of 2Programmingpuzzle.

BitWise Operators – interview Questions

We can use this property to figure out the element occurring odd number of times. The bit pattern could be non-byte aligned. But how about a cooler way to solve […].


Going by the brute force approach, it would be easy to come up with the following solution. Anonymous 22 August at Videos CareerCup’s interview videos give you a real-life look at technical interviews.

Open Chat in New Window. Sagar 2 September at Given the initial number n, determine which player will win the game if both players play optimally. How to check endianness of the computer.

Posted by PrabinDora at If the input number itself is tidy, then, it become the answer Example Input: Given an int, write bitwise operators in c interview questions to return the number of bits that are 1 in O m time, where m is the number of bits that interviiew 1. If all the bits became 0, that means no. The player loses the game when he can’t select qyestions such k. Resume Review Most engineers make critical mistakes on their resumes — we can fix your bitwise operators in c interview questions with our custom resume review service.

Please have a operatora on this and i hope that it will really help you to improve your logics. And, we use fellow engineers as our resume reviewers, so you can be sure that we “get” what you’re saying.

c bitwise operators interview questions and answers

The best thing about this blog is that you doing from beginning to experts level. Which bitwise operator is suitable for turning off a particular bit in a number? In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.


In this interrview we will look at some complex application of bitwise operators. Tks very much for your post. Your task is simple, you have to find the Nth number of this sequence. As the condition is false world is printed on the screen. Aakash Srivastav 18 November at Draw a horizontal line.

Subscribe to our Newsletter and bitwise operators in c interview questions updated.

Tricky C questions: Tricky C interview questions

Bit Manipulation Interview Questions Page:. CareerCup is the world’s biggest and best source for software engineering interview preparation.

I was operattors looking for these question to get prepare for.

Initially there is a number n written on board. Write a function that determines the number of bits set to 1 in the binary representation of an integer. CareerCup’s interview videos give you a real-life look inrerview technical interviews. Kix Mr 26 October at So we can compare p. Finally a is replaced withi.