Operators



1. Which of the following are value types? 1. Integer 2. Array 3. Single 4. String 5. Long  

  • A) 1,2,5
  • B) 1,3,5
  • C) 2,4
  • D) 3,5
  • E) 4,5


2. Which of the following does not store a sign?  

  • A) Short
  • B) Integer
  • C) Long
  • D) Byte
  • E) Single


3. Which of the following is the correct default value of a Boolean type?  

  • A) 0
  • B) 1
  • C) True
  • D) False
  • E) -1


4.
Which of the following are NOT Relational operators in C#.NET?
1.  >=    
2. !=
3.  Not 
4. <=
5. <>= 
 

  • A) 1,3
  • B) 2,4
  • C) 3,5
  • D) 4,5
  • E) none of these



5.
Which of the following are Logical operators in C#.NET?
1.  &&
2. ||
3.  !
4.  Xor
5.  % 
 

  • A) 1,3,4
  • B) 1,2,3
  • C) 2,4,5
  • D) 3,4,5
  • E) none of these


6.
Which of the following statements is correct about Bitwise ^ operator used in C#.NET?
 

  • A) The ^ operator can be used to put ON a bit.
  • B) The ^ operator can be used to put OFF a bit.
  • C) The ^ operator can be used to Invert a bit.
  • D) The ^ operator can be used to check whether a bit is ON.
  • E) The ^ operator can be used to check whether a bit is OFF.


7. SOAP stands for  

  • A) Simple Object Access Program
  • B) Simple Object Application Protocol
  • C) Simple Object Access Protocol
  • D) Simple Object Account Protocol
  • E) None of these


8. The character pair ?: is a________________available in C#.  

  • A) Ternary
  • B) Increment
  • C) Decrement
  • D) Unary
  • E) Decision


9. In C#, all binary operators are  

  • A) Center-associative
  • B) Right-associative
  • C) Left-associative
  • D) Top-associative
  • E) Down-associative


10.
An _______ is a symbol that tells the computer to perform certain mathematical or logical manipulations.
 

  • A) Class
  • B) Objects
  • C) Variables
  • D) Operators
  • E) Logic


11. What is difference between is and as operators in c#?  

“is” operator is used to check the compatibility of an object with a given type and it returns the result as Boolean. “as” operator is used for casting of object to a type or a class.


12. What are the special operators in C#?  

C# supports the following special operators.
is (relational operator),as (relational operator),typeof (type operator),sizeof (size operator),new (object creator), .dot (member access operator),checked (overflow checking),unchecked (prevention of overflow checking)


13. What is meant by operators in c#?  

An operator is a member that defines the meaning of applying a particular expression operator to instances of a class. Three kinds of operators can be defined: unary operators, binary operators, and conversion operators. All operators must be declared as public and static.


14. What is the difference between CONST and READONLY?  

Both are meant for constant values. A const field can only be initialized at the declaration of the field. A readonly field can be initialized either at the declaration or.


Java Interview Question

.Net Interview Question

PHP Interview Question

AngularJS Interview Questions