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 / subbu

gives an error because at the time of initialization we
should not use variables, we can use only constants at the
time of initialization.

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is main () in c?

1078


‘ C’ PROGRAME TO SHOW THE TYPE OF TRANGLE BY ACCEPTING IT’S LENGTH .

2883


What is the mean of function?

1137


Is there a built-in function in C that can be used for sorting data?

1270


Does c have function or method?

1007


Write a code to generate a series where the next element is the sum of last k terms.

1229


What is && in c programming?

1167


What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?

1248


Explain threaded binary trees?

1166


Is swift based on c?

1109


Explain what is a static function?

1114


Can include files be nested?

1118


What is difference between union and structure in c?

1170


Explain about C function prototype?

1100


What is meant by type casting?

1057