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

#include
main()
{
int i=1,j=2;
switch(i)
{
case 1: printf("GOOD");
break;
case j: printf("BAD");
break;
}
}

Answer Posted / suresh reddy

Compiler Error: Constant expression required in function
main

instead of using j u we can use case 'j' .

this is correct answer

Is This Answer Correct ?    5 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Are c and c++ the same?

1053


What is bubble sort in c?

1047


What are the complete rules for header file searching?

1073


How can a program be made to print the line number where an error occurs?

1082


Why is #define used?

1273


Is it possible to use curly brackets ({}) to enclose single line code in c program?

1316


How to write a multi-statement macro?

1040


How can I convert a number to a string?

1163


What is wrong with this program statement?

1031


Explain how can I convert a number to a string?

1150


What are categories used for in c?

1091


Which is better between malloc and calloc?

1198


Write a program to swap two numbers without using the third variable?

1061


What is the -> in c?

1007


When can a far pointer be used?

1021