edited by
179 views
0 votes
0 votes

For the block-structured code, assuming the usual static scoping of declarations, give the scope for each of the twelve declarations.

{
   int w,x,y,z;         /* Block B1 */
   {
      int x,z;         /* Block B2 */
      {
         int w,x;      /* Block B3 */
      }
   }

   { 
       int w,x;       /* Block B4 */  
       {
          int y,z;   /* Block B5 */
        }
    }
}
edited by

Please log in or register to answer this question.

Related questions

0 votes
0 votes
0 answers
1
admin asked Jul 26, 2019
122 views
For the block-structured C code, indicate the values assigned to $w,x,y$ and $z$.int w,x,y,z; int i = 3; int j = 4; { int i = 5; w = i + j; } x = i + j; { int j = 6; i =...
0 votes
0 votes
0 answers
2
admin asked Jul 26, 2019
152 views
For the block-structured C code, indicate the values assigned to $w, x, y$, and $z$. int w,x,y,z; int i = 4; int j = 5; { int j = 7; i = 6; w = i + j; } x = i + j; { int ...
0 votes
0 votes
1 answer
3
admin asked Jul 26, 2019
199 views
What is printed by the following C code?#define a (x+1) int x = 2; void b() {x = a; printf("%d\n",x);} void c() {int x = 1; printf("%d\n"),a;} void main() {b(); c();}
0 votes
0 votes
0 answers
4
admin asked Sep 7, 2019
1,208 views
Determine the types and relative addresses for the identifiers in the following sequence of declarations:float x; record { float x; float y; } p; record { int tag; float ...