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

d.computes compound interest for 1 year

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the ANSI C Standard?

784


What is C language ?

1537


Write a code to generate divisors of an integer?

647


can any one tel me wt is the question pattern for NIC exam

1564


A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler

632






Is main a keyword in c?

644


What are the salient features of c languages?

631


Can you mix old-style and new-style function syntax?

670


Why do we use namespace feature?

588


What is the size of structure pointer in c?

618


Why is c so popular?

656


what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?

1458


1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. 2) the Event Manager has to send participants to the stage to perform in the order in which they registered. Write a program that will help the Event Manager know who to call to the stage to perform. The Logic should be in Data Structures

2747


What is string function in c?

544


writ a program to compare using strcmp VIVA and viva with its output.

1532