The Gateway to Computer Science Excellence
0 votes
47 views
the output of the following problem?

main()

{

  int a=1,b=2,c=4;

  printf("%d",a+=(a+=4,10,a));

}

 

Explain?
closed as a duplicate of: Test series
in Programming by
closed by | 47 views
0
a+=(a+=4,10,a)

first execute in bracket

(a=5,10,1)

we can take a=5

then a+=5

a=a+5 here a=5

then answer =10

this program prints output 10
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
52,218 questions
59,895 answers
201,086 comments
118,134 users