Question Set

1. Bit fields CANNOT be used in union.



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.02 pm
    The following is the example program to explain "using bit fields inside an union". #include<stdio.h> union Point { unsigned int x:4; unsigned int y:4; int res; }; int main() { union Point pt; pt.x = 2; pt.y = 3; pt.res = pt.y; printf("\n The value of res = %d" , pt.res); return 0; } // Output: The value of res = 3
Show Similar Question And Answers
QA->The Appalachian coal fields; one of the important coal fields in the world; are located in which country?....
QA->The Appalachian coal fields, one of the important coal fields in the world, are located in which country?....
QA->Bit ന്റെ പൂർണ്ണരൂപം?....
QA->ബിറ്റ് കോയിൻ (Bit Coin) ഔദ്യോഗിക കറൻസിയായി അംഗീകരിച്ച ആദ്യ രാജ്യം?....
QA->The method that cannot be used for removing permanent hardness of water is?....
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->Bit fields CANNOT be used in union.....
MCQ->Which of the following statements are correct about the structure declaration given below? struct Book { private String name; protected int totalpages; public Single price; public void Showdata() { Console.WriteLine(name + " " + totalpages + " " + price); } Book() { name = " "; totalpages = 0; price = 0.0f; } } Book b = new Book(); We cannot declare the access modifier of totalpages as protected. We cannot declare the access modifier of name as private. We cannot define a zero-argument constructor inside a structure. We cannot declare the access modifier of price as public. We can define a Showdata() method inside a structure.....
MCQ->For a voltage transfer function H(s), realizable by RLC network, the following statements are made H(s) cannot have a pole at s = 0H(s) cannot have a pole at s = ± j4H(s) cannot have a pole at s = ∞H(s) cannot have a pole at s = + 2 Of these statements....
MCQ->What will be the output of the program ? #include<stdio.h> int main() { struct value { int bit1:1; int bit3:4; int bit4:4; }bit={1, 2, 13}; printf("%d, %d, %d\n", bit.bit1, bit.bit3, bit.bit4); return 0; }....
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