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
What is the ANSI C Standard?
What is C language ?
Write a code to generate divisors of an integer?
can any one tel me wt is the question pattern for NIC exam
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
Is main a keyword in c?
What are the salient features of c languages?
Can you mix old-style and new-style function syntax?
Why do we use namespace feature?
What is the size of structure pointer in c?
Why is c so popular?
what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?
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
What is string function in c?
writ a program to compare using strcmp VIVA and viva with its output.