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
Write a program to generate a pulse width frequency of your choise,which can be variable by using the digital port of your processor
What is the meaning of && in c?
write a program to create a sparse matrix using dynamic memory allocation.
what type of questions arrive in interview over c programming?
Can a pointer be static?
Should I learn c before c++?
Badboy is defined who has ALL the following properties: Does not have a girlfriend and is not married. He is not more than 23 years old. The middle name should be "Singh" The last name should have more than 4 characters. The character 'a' should appear in the last name at least two times. The name of one of his brothers should be "Ram" Write a method: boolean isBadBoy(boolean hasGirlFriend , boolean isMarried, int age , String middleName , String lastName , String[] brotherName); isHaveGirlFriend is true if the person has a girlfriend isMarried is true if the person is married age is the age of the person middleName is the middle name of the person lastName is the last name of the person brotherName is the array of the names of his brothers
What is the general form of #line preprocessor?
What is a stream water?
Why do we use & in c?
What is the difference between array and pointer?
a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list
How the c program is executed?
Write a code to determine the total number of stops an elevator would take to serve N number of people.
What does stand for?