The Gateway to Computer Science Excellence
0 votes
47 views

in Programming by Active (1.2k points) | 47 views
0
is it 2?
0
Yes, can you explain please ?
0
Bro, that is conditional operator.
 
syntax :  (condition) ?  stmt1 : stmt2;
if the condition is true then statement 1 else statement 2. Though the value of b is 0.
(b==0) -> (0==0) returns true. so, the value a (2) assigned to y.

Please log in or register to answer this question.

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,373 answers
198,511 comments
105,286 users