samiuljahan's blog

there's always room for improvement

Basic Programming Quiz 0001

leave a comment »

Examine the code snippets given below—-

#include <stdio.h> 
int main()
{ 
  int x;
  x = 10;
  if(x == 10) { 
    int x; 
    x = 99; 
    printf("Inner x: %d\n", x);
  }
  printf("Outer x: %d\n", x); 
  return 0;
}

What does the program displays?

Advertisement

Written by সামিউল(samiul)

September 9, 2011 at 8:47 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.