606 views
1 votes
1 votes
what will be the output of the code please elaborate the scopes ?

#include<stdio.h>
int a=10,b=20;
C(){  a=23;
      printf("%d %d\n",a,b);
      D();
      a=6,b=7;
   }
D(){  b=44;
     E();
     printf("%d %d\n",a,b);

   }
E(){
     printf("%d %d\n",a,b);
      a=1,b=2;
    }
int main()
{
    int a=5,b=6;
    C();
    a=2,b=3;
    E();
    printf("%d %d\n",a,b);
    
    return 0;
}

Please log in or register to answer this question.

Related questions

1 votes
1 votes
0 answers
1
Balaji Jegan asked Oct 23, 2018
222 views
0 votes
0 votes
0 answers
2
Gatetarget_100 asked Aug 3, 2018
559 views
int main() { int a[10]; printf("%d",*a+1-*a+3); return 0; }Answer is given as 4 but i think it should be 8, if int is of 4 byte. Correct me if i am wrong
1 votes
1 votes
0 answers
3
Shijith M asked Aug 1, 2018
811 views
int main(){ static int i=5; if( i){ main(); printf("%d ",i); }} This program answer is 0 0 0 0 .how is this? Please explain to me.
1 votes
1 votes
2 answers
4
Sambhrant Maurya asked Jul 15, 2018
306 views
Shouldn't the answer be r,7? Its given r,4.