C# Interview Questions - 36 | Snaprecruit.com

C# Interview Questions - 36 | Snaprecruit.com

C SHARP interview questions part 36

C SHARP interview questions part 36

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

Total Questions: 20

1. What is the use of the flip function in bitset?

Correct Answer is : Use of return statement is necessary in every function

2. What happens when no argument is supplied to flip() function?

Correct Answer is : 2 byte

3. What happens when only one argument is supplied to flip() function?

Correct Answer is : 4 bytes

4. What is the output of the following C++ code? #include #include using namespace std; int main() { bitset<8> b1(95); bitset<8> b2(46); cout<<(b1^b2); }

Correct Answer is : increment value contained at address p

5. What is the output of the following C++ code? #include #include using namespace std; int main() { bitset<8> b1(95); bitset<8> b2 = b1 << 3; cout<
Correct Answer is : 6


6. What is the output of the following C++ code? #include #include using namespace std; int main() { bitset<8> b1(95); bitset<8> b2 = b1 >> 3; cout<
Correct Answer is : Compile time error


7. Which operator is used as not operator in bitset?

Correct Answer is : int*[4] p;

8. Which operator is used to take AND of two bitset variables?

Correct Answer is : void

9. Which operator is used to take OR of two bitset variables?

Correct Answer is : as many as user wants

10. What is the output of the following C++ code? #include #include using namespace std; int main() { bitset<8> b1(95); bitset<8> b2(45); cout<<~b1<
Correct Answer is : value at a, address contained in a


11. Is bool a fundamental data type in C++?

Correct Answer is : program will print value of a1

12. Find the odd one out:

Correct Answer is : program will print 1000

13. What is the value of the bool? bool is_int(789.54)

Correct Answer is : program prints 65535

14. What happens when a null pointer is converted into bool?

Correct Answer is : Uniform Resource Locator

15. Which of the following statements are false?

Correct Answer is : MalformedURLException

16. For what values of the expression is an if-statement block not executed?

Correct Answer is : All of the mentioned

17. Which of the two operators ++ and — work for the bool data type in C++?

Correct Answer is : InetAddress

18. What is the output of the following program? #include using namespace std; int f(int p, int q) { if (p > q) return p; else return q; } main() { int a = 5, b = 10; int k; bool x = true; bool y = f(a, b); k =((a * b) + (x + y)); cout << k; }

Correct Answer is : Mime

19. What is the value of p? #include using namespace std; int main() { int p; bool a = true; bool b = false; int x = 10; int y = 5; p = ((x | y) + (a + b)); cout << p; return 0; }

Correct Answer is : All of the mentioned

20. Evaluate the following (false && true) || false || true

Correct Answer is : text/html

Similar Interview Questions

    Search for latest jobs

    Icon
    Icon