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

what is the different between if-else and switch statment
(other than syntax)

Answer Posted / mohemmed bilal

main difference between both statement is that we can only
use switch for one variable eg
switch(x)
{
case 1://do this;
case 2://do this;
case 3://do this;
}
while in if else we can use multiple condition like
if(x==0&&y==0)
{
printf("");
}
else if(x==1&&y==0)
{
printf("");
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

The number of measuring units from an arbitarary starting point in a record,area,or control block to some other point a) recording pointer b) offset c) branching d) none

1200


What is #define?

1054


What is the difference between memcpy and memmove?

985


Explain high-order and low-order bytes.

1059


Mention four important string handling functions in c languages .

1060


Why can arithmetic operations not be performed on void pointers?

999


What are Macros? What are its advantages and disadvantages?

1106


Can you write a programmer for FACTORIAL using recursion?

998


c programs are converted into machine language with the help of a) an interpreter b) a compiler c) an operatinf system d) none of the above

1223


Define Spanning-Tree Protocol (STP)

1079


When reallocating memory if any other pointers point into the same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?

1225


Write a program to find the biggest number of three numbers in c?

1022


What are the output(s) for the following ? #include char *f() {char *s=malloc(8); strcpy(s,"goodbye")} main() { char *f(); printf("%c",*f()='A'); }

1143


What is masking?

1110


What are the functions to open and close the file in c language?

1005