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 does the following code do?
fn(int n,int p,int r)
{
static int a=p;
switch(n){
case 4:a+=a*r;
case 3:a+=a*r;
case 2:a+=a*r;
case 1:a+=a*r;
}
}
a.computes simple interest for one year
b.computes amount on compound interest for 1 to 4 years
c.computes simple interest for four year
d.computes compound interst for 1 year

Answer Posted / eswaran

initializer is a constant value..so its not possible to
change the value at run time..

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does 3 periods mean in texting?

1071


Do you know the difference between exit() and _exit() function in c?

1065


What is a shell structure examples?

1109


is it possible to create your own header files?

1107


When should structures be passed by values or by references?

1050


How can I write a function that takes a format string and a variable number of arguments?

1060


What does volatile do?

988


what is the role you expect in software industry?

2154


Why c is called procedure oriented language?

1059


Explain the use of 'auto' keyword in c programming?

1121


how do you write a function that takes a variable number of arguments? What is the prototype of printf () function?

1947


What are the 5 types of organizational structures?

1085


When was c language developed?

1204


What is variable in c example?

1081


What is the concatenation operator?

1156