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 you please explain the difference between exit() and _exit() function?

1028


What is openmp in c?

1022


Why is extern used in c?

1091


Are local variables initialized to zero by default in c?

1049


#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} wat would be the output??

1951


what is the significance of static storage class specifier?

2254


What’s a signal? Explain what do I use signals for?

1105


What is a constant and types of constants in c?

1117


1.int a=10; 2.int b=20; 3. //write here 4.b=30; Write code at line 3 so that when the value of b is changed variable a should automatically change with same value as b. 5.

2148


What are the 5 elements of structure?

1077


What is meant by type specifiers?

1128


What is void main () in c?

1206


What is the default value of local and global variables in c?

1039


How can I write a function analogous to scanf?

1178


main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }

1547