C# Interview Questions - 35 | Snaprecruit.com
C# Interview Questions - 35 | Snaprecruit.com
JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing
Enterprises
C SHARP interview questions part 35
C SHARP interview questions part 35
Back
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?
A. Hi
B. hello
C. Hihello
D. Compile time error
Show Correct Answer
Correct Answer is :
hello
2. Which of the following is the limitation of bitset over vector bool?
A. try
B. catch
C. throw
D. check
Show Correct Answer
Correct Answer is :
try
3. Which operator is used to access the nth bit in a bitset?
A. Csharp
B. sharp
C. C
D. Compile time error
Show Correct Answer
Correct Answer is :
Compile time error
4. How many ways are there for constructing a bitset?
A. C
B. sharp
C. Csharp
D. None of the mentioned
Show Correct Answer
Correct Answer is :
Csharp
5. Which is the correct syntax of constructing a bitset?
A. Hi
B. hello
C. Hihello
D. Compile time error
Show Correct Answer
Correct Answer is :
Hi
6. Which of the following is corect way of constructing bitset using integer number?
A. try
B. catch
C. throw
D. check
Show Correct Answer
Correct Answer is :
throw
7. Which of the following is corect way of constructing bitset using binary string?
A. To store a value of one data type into a variable of another data type
B. To get desired data
C. To prevent situations of runtime error during change or conversion of data type
D. None of the mentioned
Show Correct Answer
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?
A. Implicit Conversion
B. Explicit Conversion
C. Implicit Conversion and Explicit Conversion
D. None of the mentioned
Show Correct Answer
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<
A. float < char < int
B. char < int < float
C. int < char < float
D. float < int < char
Show Correct Answer
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<
A. Compiler will generate runtime error
B. Conversion is implicit type, no error generation
C. Specifying data type for conversion externally will solve the problem
D. None of the mentioned
Show Correct Answer
Correct Answer is :
Conversion is implicit type, no error generation
11. Indexing of bitset variables starts from ___________
A. long ,ulong, ushort
B. long, ulong, uint
C. long, float, double
D. long, float, ushort
Show Correct Answer
Correct Answer is :
long, float, double
12. What is the use of count() function in bitset?
A. Makes program memory heavier
B. Results in loss of data
C. Potentially Unsafe
D. None of the mentioned
Show Correct Answer
Correct Answer is :
Results in loss of data
13. Which of the following is correct about any() function in bitset?
A. Generics make code more fast
B. Generics make code more optimised and readable
C. Generics add stability to your code by making more of your bugs detectable at compile time
D. Generics add stability to your code by making more of your bugs detectable at run time
Show Correct Answer
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?
A. K
B. N
C. T
D. V
Show Correct Answer
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<
A. name(T1, T2, …, Tn) { /* … */ }
B. public name { /* … */ }
C. class name[T1, T2, …, Tn] { /* … */ }
D. name{T1, T2, …, Tn} { /* … */ }
Show Correct Answer
Correct Answer is :
public name { /* … */ }
16. What is the use of the set() function in bitset?
A. Generics class declaration
B. Declaration of variable
C. A simple class declaration
D. Both Generics class declaration & Declaration of variable
Show Correct Answer
Correct Answer is :
Both Generics class declaration & Declaration of variable
17. What happens when no argument is supplied to set() function?
A. Gen
B. Gen
C. Gen
D. None of the mentioned
Show Correct Answer
Correct Answer is :
Gen
18. What is the use of reset function in bitset?
A. Generics class decleration
B. Decleration of variable
C. Generic constructor decleration
D. All of the mentioned
Show Correct Answer
Correct Answer is :
Generic constructor decleration
19. What happens when no argument is supplied to reset() function?
A. Value
B. Address
C. Value and Address
D. Name of the variable
Show Correct Answer
Correct Answer is :
Address
20. What happens when only one argument is supplied to reset() function?
A. *
B. ^
C. &
D. ~
Show Correct Answer
Correct Answer is :
&
Similar Interview Questions
Search for latest jobs
Find Jobs