Hi and welcome to Placement Yogi ! You can find all your placement related queries here.
The Website is backed by a strong group of Professionals from Companies like Cisco, McAfee,Juniper,Symphony, TCS, Cognizant.
Our Aim is to get you placed!
And we DO NOT like to FAIL!!
What is the output of:
The variable declared inside the inner block replaces the x declared in the outer block, hence it prints 20 at 1st printf.
When the inner block ends, the scope of inner x also ends and hence the value of x becomes 40 in the outer block.
is it possible to have curley brace with the variable declaration
Yes it is possible.