Sail E0 Webinar
Question


What will be the output of the program?


#include<stdio.h>
nt x = 40;
int main()
{
int x = 20;
printf ("%d\n", x);
return 0;
}
Options:
A .  20
B .  40
C .  Error
D .  No Output
Answer: Option A

Whenever there is conflict between a local variable and global variable, the local 

variable gets priority.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers