Monday, July 8, 2019

c interview questions2

#include <stdio.h>
#include <stdlib.h>

int main()
{
    int i=9;
    if(i==9)
    {
        int i=25;
    }
    printf("i=%d",i);
   // printf("Hello world!\n");
    return 0;
}


output:
i=9


explanation:in if block it is again defined but it takes like function inside declaration

No comments:

Post a Comment

python class topic video