It is known that x and n are integers where x has a value of

It is known that x and n are integers, where x has a value of -1 and n has a value of 5. What is the value of the following expression? !(++x|| n) + 6 - (!n && n* (n

Solution

here x=-1

++x=0

(++x||n) value is (0||5) which is equal to 1. !1 is 0

Hence !(++x||n) is 0

for (!n &&n*(n<n)) value is calculated as follows:

n<n is 5<5 which is 0

!n is !5 which is 0

so  (!n &&n*(n<n)) can be written as (0 && 5*(0)) which is 0

Hence the final expression !(++x||n)+6-(!n &&n*(n<n)) is

0+6-0=6

So output is 6

 It is known that x and n are integers, where x has a value of -1 and n has a value of 5. What is the value of the following expression? !(++x|| n) + 6 - (!n &a

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site