The Gateway to Computer Science Excellence
0 votes
What is the output? and how?


int main(){
    int var=75;
    int var2=56;
    int num;
    return 0;
in Programming by (29 points) | 43 views
It'll print ASCII value of A = 65
Ternary operator works here.

sizeof(var) is non zero , non -zero value is true .

var2>23?((var==75)?'A':0 ):0is executed.

var2>23 is true.

(var==75)?'A':0 is executed.

var==75 is true.

'A' is returned by the expression.

%d will print ASCII value of 'A'
thank you..

Please log in or register to answer this question.

No related questions found

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,391 answers
105,442 users