Warning: implode(): Invalid arguments passed in /www/wwwroot/jobquiz.info/mdiscuss.php on line 336
Suppose n is a variable of the type Byte and we wish, to check whether its fourth bit (from right) is ON or OFF. Which of the following statements will do this correctly? ?->(Show Answer!)
Question Set

1. Suppose n is a variable of the type Byte and we wish, to check whether its fourth bit (from right) is ON or OFF. Which of the following statements will do this correctly?






Ask Your Doubts Here

Type in
(Press Ctrl+g to toggle between English and the chosen language)

Comments

  • By: guest on 01 Jun 2017 06.04 pm
    byte myByte = 153; // In Binary = 10011001 byte n = 8; // In Binary = 00001000 (Here 1 is the 4th bit from right) Now perform logical AND operation (n & myByte) 10011001 00001000 --------- 00001000 Here result is other than 0, so evaluated to True. --------- If the result is true, then we can understand that 4th bit is ON of the given data myByte.
Show Similar Question And Answers
QA->Two statements are given followed by two conclusions I and II. You have to consider the two statements to be true even if they seem to be at variance from commonly known facts. You have to decide which one of the given conclusions is definitely drawn from the given statements. Statement : All virtuous persons are happy. No unhappy person is virtuous. Conclusions : I. Happiness is related to virtue II. Unhappy person is not virtuous.....
QA->John started from his home and walked 12 km.Then he took a right turn and walked 4 km.Then again,he took a right turn and walked 8 km and finally took another right turn and walked 1 km.How far is he from his home now?....
QA->Arjun walks 2 kms northwards and then he turns right and moves 3 kms. He again turns right and goes 2 kms and turns his left and starts walking straight. In which direction he is walking now ?....
QA->Arjun walks 2 kms northwards and then he turns right and moves 3 kms. He again turns right and goes 2 kms and turns his left and starts walking straight. In which direction he is walking now ?....
QA->Arjun walks 20 m towards North. Then he turns right and walks 30 ms. Again he turns right and walks 35 ms. Then he turns left and walk 15 ms. How far and in which direction Arjun now from his starting point?....
MCQ->Suppose n is a variable of the type Byte and we wish, to check whether its fourth bit (from right) is ON or OFF. Which of the following statements will do this correctly?....
MCQ->Suppose n is a variable of the type Byte and we wish to put OFF its fourth bit (from right) without disturbing any other bits. Which of the following statements will do this correctly?....
MCQ->Which of the following statements are correct about the Bitwise & operator used in C#.NET? The & operator can be used to Invert a bit. The & operator can be used to put ON a bit. The & operator can be used to put OFF a bit. The & operator can be used to check whether a bit is ON. The & operator can be used to check whether a bit is OFF.....
MCQ->What will be the output of the C#.NET code snippet given below? byte b1 = 0xAB; byte b2 = 0x99; byte temp; temp = (byte)~b2; Console.Write(temp + " "); temp = (byte)(b1 << b2); Console.Write (temp + " "); temp = (byte) (b2 >> 2); Console.WriteLine(temp);....
MCQ->Which of the following sentences are correct about a switch loop in a C program? 1: switch is useful when we wish to check the value of variable against a particular set of values. 2: switch is useful when we wish to check whether a value falls in different ranges. 3: Compiler implements a jump table for cases used in switch. 4: It is not necessary to use a break in every switch statement.....
Terms And Service:We do not guarantee the accuracy of available data ..We Provide Information On Public Data.. Please consult an expert before using this data for commercial or personal use | Powered By:Omega Web Solutions
© 2002-2017 Omega Education PVT LTD...Privacy | Terms And Conditions
Question ANSWER With Solution