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 far pointer in c?

1295


What is the value of a[3] if integer a[] = {5,4,3,2,1}?

1075


What would be an example of a structure analogous to structure c?

979


What is #error and use of it?

1254


What is a program flowchart and explain how does it help in writing a program?

1284


What is binary tree in c?

1076


Which is better oop or procedural?

1041


How do you sort filenames in a directory?

1161


Simplify the program segment if X = B then C ← true else C ← false

2994


What is the difference between ā€˜g’ and ā€œgā€ in C?

3971


Find duplicates in a file containing 6 digit number (like uid) in O (n) time.

3230


Define C in your own Language.

1061


What is scope rule in c?

1048


Can we declare a function inside a function in c?

1022


When I set a float variable to, say, 3.1, why is printf printing it as 3.0999999?

1051