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 role of && operator in a program code?
PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE
What is the difference between array and pointer in c?
Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?
Which is the memory area not included in C program? give the reason
Tell me what are bitwise shift operators?
What are structural members?
What does the file stdio.h contain?
Why can arithmetic operations not be performed on void pointers?
What is enumerated data type in c?
What is pre-emptive data structure and explain it with example?
Write a C program on Centralized OLTP, Decentralized OLTP using locking mechanism, Semaphore using locking mechanism, Shared memory, message queues, channel of communication, sockets and a simple program on Saving bank application program using OLTP in IPC?
When should a far pointer be used?
What is the use of void pointer and null pointer in c language?
What is a buffer in c?