Develop To Improve

Sunday, November 10, 2019

static scope

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

int main()
{
     int x=1;
     int y=1;
    if(y==1){
        int x=2;
    }
    printf("%d",x);
}


when I run the code it prints 1 on the screen. anyone has any idea?
Posted by shortnevs at 4:04 AM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

About Me

shortnevs
View my complete profile

Blog Archive

  • ►  2020 (2)
    • ►  June (1)
    • ►  April (1)
  • ▼  2019 (19)
    • ►  December (1)
    • ▼  November (18)
      • chapter 2-Homework Problems and Questions R2
      • chapter 2-Homework Problems and Questions R1
      • blender models
      • BLEDNDER S400 TRUCK AND PATRIOT MODELS
      • INSTALLING PYTHON WITH LIBRARY ALL LIBRARYES
      • Blender Tire
      • Exercise Set One (Chapters 1/2/3) Problem: Define ...
      • Consider the “exactly once”semantic with respect t...
      • operationg system 3rd chapter
      • operation system chapter 3
      • erorr on web pages 404 500 300
      • explicit and implicit programming languages
      • static scope
      • What is the difference between an intrinsic attrib...
      • How to Access Wikipedia if it is Banned.
      • http://pelajaranbahasaprogram.blogspot.com/2014/0...
      • https://adhywiranatabinusian.wordpress.com/2013/...
      • Data Types Primitive Data Composite Data Types
Awesome Inc. theme. Powered by Blogger.