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

explain what are pointers?

1014


write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays

2255


a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f

2157


Explain what are the different file extensions involved when programming in c?

1110


How would you use the functions fseek(), freed(), fwrite() and ftell()?

1166


What is storage class?

1079


How can you check to see whether a symbol is defined?

1103


What are conditional operators in C?

1100


What is f'n in math?

1069


Write a code to generate divisors of an integer?

1069


State two uses of pointers in C?

1063


Do you have any idea how to compare array with pointer in c?

1048


Is null always defined as 0(zero)?

1113


What is the difference between arrays and pointers?

1130


What is a program?

1264