edited by
438 views
2 votes
2 votes

what will be the output:

(a) 3 5 8 8 3 (b) 3 5 7 8 8 (c) compilation error

edited by

2 Answers

Best answer
4 votes
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

selected by

Related questions

1 votes
1 votes
0 answers
1
0 votes
0 votes
1 answer
2
Hemant Parihar asked Feb 3, 2017
538 views
#include<stdio.h>int main() { char *p; p = "%d\n"; p++; p++; printf(p-2, 400); return 0;}Output : 400I ran this program and got 400 as output. But I don...
2 votes
2 votes
2 answers
4