2 2 votes what will be the output: (a) 3 5 8 8 3 (b) 3 5 7 8 8 (c) compilation error Programming in C ace-test-series programming + – Prateek Raghuvanshi 1.0k views answer comment Share Follow Print See all 5 Comments 5 5 Comments reply Show 2 previous comments joshi_nitish commented Oct 10, 2017 reply Follow flag @Prateek Raghuvanshi they are declared in different scope( { } ), so no problem....if they were declared in same scope than it would lead to redeclaration error at compile time. 1 1 replyShare Rishabh Gupta 2 commented Oct 10, 2017 reply Follow flag All those are in different scope. 1 1 replyShare Prateek Raghuvanshi commented Oct 10, 2017 reply Follow flag okk i got it now thank u 0 0 replyShare Please log in or register to add a comment.
Best answer 4 4 votes This question is based on the block scope of a variable. A variable declared in a block is accessible in the block and all inner blocks of that block but not accessible outside the block. Hence option a) is correct Ashwani Kumar 2 answered Oct 10, 2017 • selected Oct 10, 2017 by srestha Ashwani Kumar 2 comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes Option a is correct because of scope Rishi yadav answered Oct 11, 2017 Rishi yadav comment Share Follow 0 reply Please log in or register to add a comment.