Computer Science, asked by venkataramanamundra, 4 months ago

#include<stdio.h>
int x = 10;
int main()
{
int x = 0;
printf("%d",x);
return ;​

Answers

Answered by DeepakUgalePatil
2

Answer:

0

compiler error

Explanation:

i hope this is your answer

Answered by mindfulmaisel
1

0

C Program:

The C program for which we have to find the output is:
#include<stdio.h>

int x = 10;

int main()

{

int x = 0;

printf("%d",x);

return ;​

}

In this program, the variable is declared two times. However, when x is declared as 10, it is a global variable. Hence, when the program compiles it takes the value of x as 0. Now, the output will be zero.

Similar questions