1,683 views
1 1 vote
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.

Position:
Show:

Related questions

1 1 vote
3 3 answers
603
603 views
ykaran12x asked Dec 3, 2024
603 views
#include<stdio.h int main (){int a=0, b=1;while(++a<=5) {do {b+=2;} while(b++<=10);}return 0;}The sum of the values of a and b is ______.
1 1 vote
0 0 answers
488
488 views
0 0 votes
0 0 answers
1.1k
1.1k views
Gatetarget_100 asked Aug 3, 2018
1,086 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 1 vote
0 0 answers
1.2k
1.2k views
Shijith M asked Aug 1, 2018
1,155 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.