Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
0
When the global and the local variable have the same name : 1. Local variable is taken in the local scope where it is defined. 2. Outside the local scope the global is used. So if we have #include<stdio.h> int x = 5; int main(){ int x = 10; printf("x is : ",x); return 0; } // This code here prints 10
7th Jun 2020, 4:51 AM
NEZ
NEZ - avatar