Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

can we declare a variable in different scopes with different
data types? answer in detail

Answer Posted / tatukula

Yes,
why because that variable scope is ends with in that block only...

int main()
{
int a=20;
printf("%d\n",a);

{
char a='c';
printf("%c\n",a);
}
printf("%d\n",a);
}

output: 20 c 20

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we use any name in place of argv and argc as command line arguments?

1125


What are near, far and huge pointers?

1114


What is return in c programming?

1020


a=10;b= 5;c=3;d=3; if(a printf(%d %d %d %d a,b,c,d) else printf("%d %d %d %d a,b,c,d);

1195


What are the storage classes in C?

1203


Explain how do I determine whether a character is numeric, alphabetic, and so on?

1181


Why & is used in c?

1247


What is use of integral promotions in c?

1207


When I set a float variable to, say, 3.1, why is printf printing it as 3.0999999?

1115


What is signed and unsigned?

1121


What are types of preprocessor in c?

1112


‎How to define structures? · ‎

1147


This is a variation of the call_me function in the previous question:call_me (myvar)int *myvar;{ *myvar += 5; }The correct way to call this function from main() will be a) call_me(myvar) b) call_me(*myvar) c) call_me(&myvar) d) expanded memory

1339


in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none

1154


What is the purpose of sprintf?

1203