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

Why does this code crash?

1027


Write a program to print all permutations of a given string.

1128


What is substring in c?

1132


Write a program, where i have a grid with many cells, how many paths are possible from one point to other desired points.

1186


write a c program for swapping two strings using pointer

2567


What is the use of getchar() function?

1074


Explain 'far' and 'near' pointers in c.

1082


List out few of the applications that make use of Multilinked Structures?

2109


Differentiate between full, complete & perfect binary trees.

1052


What is the difference between the local variable and global variable in c?

927


Can you apply link and association interchangeably?

1071


What are the __date__ and __time__ preprocessor commands?

1040


Why c is faster than c++?

979


Explain what is the difference between functions abs() and fabs()?

1099


Is c is a middle level language?

1012