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 / surenda pal singh chouhan

Compiler Error: Constant expression required in function
main.

Explanation:
The case statement can have only constant expressions (this
implies that we cannot use variable names directly so an
error).
Note:
Enumerated types can be used in case statements.

Is This Answer Correct ?    10 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Linked list is a Linear or non linear explain if linear how it working as a non linear data structures

2173


What is maximum size of array in c?

1037


Why string is used in c?

1003


difference between Low, Middle, High Level languages in c ?

2080


hello freinds next week my interview in reliance,nybody has an idea about it intervew questions..so tell

2176


What is variable declaration and definition in c?

897


What the different types of arrays in c?

1059


What are shell structures used for?

1048


On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area

1110


What is pointers in c with example?

1068


How can I make sure that my program is the only one accessing a file?

1261


Why do we use null pointer?

1060


Explain what are compound statements?

1057


What should malloc() do?

1167


provide an example of the Group by clause, when would you use this clause

2189