Thursday, 8 December 2016

UGC-NET Computer Science July 2016 Solved Paper 2

UGC-NET Computer Science July 2016 Solved Paper 2


Q::11 Given i = 0, j = 1, k = –1, x = 0.5, y = 0.0

         What is the output of the following expression in C language ?

          x * y < i + j || k

          (1) – 1                                      (2)   0

          (3)    1                                      (4)   2


Answer:: (3)


Explanation::

  = x * y < i + j || k

  = 0.5 * 0.0 < 0 + 1 || -1

  = 0.0 <  0 + 1 || -1

  = 0.0 < 1 || -1

  = 1 || -1

 = 1


Here is operator precedence table for you::

CategoryOperatorAssociativity
Postfix() [] -> . ++ - -Left to right
Unary+  -  !  ~  ++  - -   (type)* & sizeofRight to left
Multiplicative* / %Left to right
Additive+ -Left to right
Shift<< >>Left to right
Relational< <= > >=Left to right
Equality== !=Left to right
Bitwise AND&Left to right
Bitwise XOR^Left to right
Bitwise OR|Left to right
Logical AND&&Left to right
Logical OR||Left to right
Conditional?:Right to left
Assignment= += -= *= /= %=>>= <<= &= ^= |=Right to left
Comma,Left to right





UGC-NET Computer Science july 2016 solved paper,UGC-NET Computer Science july 2016 paper 2,cbse-net july 2016 solved paper
ugc net computer science question papers,ugc net computer science december 2014 question papers,
ugc net computer science june 2014 question papers,
ugc net computer science december 2014 question papers,
ugc net computer science june 2013 question papers,
ugc net computer science december 2013 question papers,
ugc net computer science june 2012 question papers,
ugc net computer science december 2012 question papers,
ugc net computer science june 2011 question papers,
ugc net computer science december 2011 question papers,
ugc net computer science june 2010 question papers,
ugc net computer science december 2010 question papers,
ugc net computer science june 2009 question papers,
ugc net computer science december 2009 question papers,
ugc net computer science june 2008 quest

No comments:

Post a Comment