C SHARP interview questions part 35

C SHARP interview questions part 35

Take as many assements as you can to improve your validate your skill rating

Total Questions: 20

1. Which of the following is correct about bitset and vector of bools?

Correct Answer is : hello

2. Which of the following is the limitation of bitset over vector bool?

Correct Answer is : try

3. Which operator is used to access the nth bit in a bitset?

Correct Answer is : Compile time error

4. How many ways are there for constructing a bitset?

Correct Answer is : Csharp

5. Which is the correct syntax of constructing a bitset?

Correct Answer is : Hi

6. Which of the following is corect way of constructing bitset using integer number?

Correct Answer is : throw

7. Which of the following is corect way of constructing bitset using binary string?

Correct Answer is : To prevent situations of runtime error during change or conversion of data type

8. Which header file is required for using bitset in your program?

Correct Answer is : Explicit Conversion

9. What is the output of the following C++ code? #include #include using namespace std; int main() { bitset<8> b1(15); cout<
Correct Answer is : char < int < float


10. What is the output of the following C++ code? #include #include using namespace std; int main() { bitset<8> b1(string("15")); cout<
Correct Answer is : Conversion is implicit type, no error generation


11. Indexing of bitset variables starts from ___________

Correct Answer is : long, float, double

12. What is the use of count() function in bitset?

Correct Answer is : Results in loss of data

13. Which of the following is correct about any() function in bitset?

Correct Answer is : Generics add stability to your code by making more of your bugs detectable at compile time

14. Which of the following is correct about none() function in bitset?

Correct Answer is : T

15. What is the output of the following C++ code? #include #include using namespace std; int main() { bitset<8> b1(20); cout<
Correct Answer is : public name { /* … */ }


16. What is the use of the set() function in bitset?

Correct Answer is : Both Generics class declaration & Declaration of variable

17. What happens when no argument is supplied to set() function?

Correct Answer is : Gen

18. What is the use of reset function in bitset?

Correct Answer is : Generic constructor decleration

19. What happens when no argument is supplied to reset() function?

Correct Answer is : Address

20. What happens when only one argument is supplied to reset() function?

Correct Answer is : &

Similar Interview Questions

    Search for latest jobs

    Icon
    Icon