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...

int main()
{
int i=1;
switch(i)
{
case '1':
printf("hello");
break;
case 1:
printf("Hi");
break;
case 49:
printf("Good Morning");
break;
}
return 0;
}

Answer Posted / srsabariselvan

The program Results in Error.
it will shows error "Duplicate case".
because '1' is equal to 49(ASCII of character 1).

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none

1145


What is the equivalent code of the following statement in WHILE LOOP format?

1246


What are valid signatures for the Main function?

1167


Differentiate between #include<...> and #include '...'

1002


#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }

1126


Hai what is the different types of versions and their differences

1896


What are the types of operators in c?

1000


what is the format specifier for printing a pointer value?

965


What are the types of variables in c?

977


When should the register modifier be used? Does it really help?

916


How does struct work in c?

1030


Is c easy to learn?

931


Why c language?

1005


What does nil mean in c?

1176


What is the return type of sizeof?

1024