Code a contains a set of eight lines


Asked by admin @ in English viewed by 32765 People


Choose the correct option.

Code A contains a set of eight lines that occur ten times in different points of the program. This code ispassed to a programmer who puts the set of eight lines in a function definition and calls them at theten points in the program. Assume this new code to be Code B. Which code will run faster using aninterpreter?​

Answered by admin @


Answer:

Que: Choose the correct answer

In a sequential programming language, code statements are executed in which order?

Option 1 : All are executed simultaneously

Option 2 : From top to bottom

Option 3 : From bottom to top

Option 4 : None of these

Ams-2

Que: Choose the correct answer

The construct “if (condition) then A else B” is for which of the following purposes?

Option 1 : Decision-Making

Option 2 : Iteration

Option 3 : Recursion

Option 4 : Object Oriented Programming

Ans-1

Que: Choose the correct answer

What does this function compute for positive n?

function f(int n)

{

if (n equals 1)

{ return 1 }

else

{ return f(n-1)/f(n-1) + n }

}

Option 1 : 1 + n

Option 2 : 1 + 2 + 3 + … + n

Option 3 : 1 + n, if n > 1, 1 otherwise

Option 4 : None of the above

Ans-3

Que: Choose the correct answer

int area(double radius)

{

return PI*radius*radius;

}

Que: Which of the following is always true about the function area?

Option 1 : It returns the area of a circle within the limits of double precision.

Option 2 : It returns the area of a circle within the limits of the constant PI.

Option 3 : It returns the area of a circle within the limits of precision of double, or the constant PI, whichever is lower.

Option 4 : None of the above.

Ans-1

Que: Choose the correct answer

Assuming n > 2, What value does the following function compute for odd n?

function f (int n)

{

if (n equals 1) { return 1 }

if (n equals 2) { return f(n-1) + n/2 }

return f(n-2) + n;

}

Option 1 : 1 + 2 + 3 + 4 + … + n

Option 2 : 1 + 3 + 5 + 7 + … + n

Option 3 : n/2 + (1 + 3 + 5 + 7 + … + n)

Option 4 : 1 + (1 + 3 + 5 + 7 + … + n)

Ans-2

Que: Choose the correct answer

function g(int n)

{

if (n > 0) return 1;

else return -1;

}

function f(int a, int b)

{

if (a > b) return g(b-a);

if (a < b) return g(a-b);

return 0;

}

If f(a,b) is called, what is returned?

Answered by boggarapu @


2

Answered by boggarapu @


2

Answered by deva0735 @


B

Answered by admin @


Get Professional Capsim Homework Help, Capsim Simulation Help, Capsim Round Help, Comp XM Exam Help, And Earn The Grades You Deserve.

Answered by admin @


Discussion Board posts are the important aspect for the college students for graduating their degree. So, students always need assistance in solving their discussion board homework. So, If You are looking for some help in Discussion Board Homework Help is the place to go if you are concerned about the difficulty of your assignments but cannot pay expensive fees to have someone else complete them for you.

Do you know the better answer?

Similar Questions

What is the maximum value of p = 24x + 30y, given the constraints on x and y listed below?

Asked by maham237 @ in Mathematics viewed by 279 persons

120 132 138 150

What do you mean by working capital class 9

Asked by admin @ in Social Sciences viewed by 144 persons

What is called working capital question of class 9th economic ,please give answer in 1or2line

Which of these is exhibiting kinetic energy?

Asked by wiki @ in Biology viewed by 62 persons

A) a space station orbiting Earth B) a rock on a mountain ledge C) an archer with a flexed bow D)a person sitting on a couch while watching TV E)the …

Oxygen has lower ionization enthalpy than nitrogen and fluorine

Asked by admin @ in Chemistry viewed by 132 persons

Explain why oxygen has lower ionisation enthalpy than nitrogen and fluorine.

What makes farming in mountainous areas so difficult without terracing

Asked by maham237 @ in History viewed by 131 persons

a. poor soil quality of mountainous land b.rugged landscape of mountainous land c. lack of human resources in mountains d. lack of animal labor in mountains

What does quote mean

Asked by maham237 @ in Geography viewed by 66 persons

What does this quote mean to you?

During the industrial revolution life changed in what basic way

Asked by admin @ in History viewed by 131 persons

During the industrial revolution, life changed in the basic way?

Dates in history are expressed in two terms

Asked by admin @ in History viewed by 134 persons

The dates in history are expressed in two terms​

Thickness of a pencil measured by a screw gauge

Asked by admin @ in Physics viewed by 173 persons

Thickness of a pencil measured by using a screw gauge(least count.001 cm) comes out to be 0.802cm. The percentage error in the measurement is

Most hazardous metal pollutant of automobile exhaust is

Asked by admin @ in Biology viewed by 142 persons

Most hazardous metal pollutant of the automobile exhaust is Lead Mercury Calcium Copper

How many electrons are contained in one coulomb of charge

Asked by admin @ in Physics viewed by 125 persons

1 coulomb is equal to How many electrons?

The bonds in the compound mgso4 can be described as

Asked by admin @ in Chemistry viewed by 134 persons

The bonds in the compound MgSO4 can be described as A) covalent B) ionic C) both A &amp; B D) None of the above

1 8 27 64 next number

Asked by admin @ in Math viewed by 153 persons

What is the next number in this sequence? 1, 8, 27, 64, ___

Who is simbas mom

Asked by maham237 @ in English viewed by 57 persons

What is the name of simba's mother in the lion king?

The british conquest of bengal began with the battle of

Asked by admin @ in History viewed by 116 persons

The British conquest of Bengal began with the Battle of​

Does the table represent a function why or why not

Asked by admin @ in Math viewed by 113 persons

Does this table represent a function? Why or why not. A.) No, because two of the y values are the same B.) Yes, because every x value corresponds to exactly …

Name the principle on which a rocket works

Asked by admin @ in Science viewed by 119 persons

Name the principle on which rocket works.

What are the main characteristics of climate in kashmir valley

Asked by admin @ in Sociology viewed by 181 persons

What are the main characteristics of climate in kashmir valley?

What is the theme of the poem mending wall

Asked by admin @ in English viewed by 149 persons

Explain the central theme of the poem"mending wall"​

2 cos 3x

Asked by maham237 @ in Mathematics viewed by 108 persons

Using the expansions of cos(3x − x) and cos(3x + x), prove that 1/2(cos 2x − cos 4x) ≡ sin 3x sin x.

How does percy find the address for the underworld

Asked by maham237 @ in English viewed by 61 persons

In percy jackson the lightning thief, how does percy find the address for the underworld?

Which is the completely factored form of 4x2 28x 49

Asked by maham237 @ in Mathematics viewed by 304 persons

O (x + 7)(4x + 7) 4(x + 7)(x + 7) (2x + 7)(2x + 7) 2(x+7)(x + 7)

What does data warehousing allow organizations to achieve brainly

Asked by admin @ in Computer Science viewed by 532 persons

What does data warehouse allow organisations to achieve?​

I wandered lonely as a cloud figures of speech

Asked by admin @ in English viewed by 177 persons

What are the figure of speech used in the poem I wandered lonely as a cloud or daffodils

Why does the sun appear to rise in the east

Asked by admin @ in Science viewed by 159 persons

Why sun appears to rise in the east and sets in the west

When iron nail is put in copper sulphate solution

Asked by admin @ in Chemistry viewed by 186 persons

what happen when iron nails are placed in copper sulphate solution ?write word equation of the reaction involved.

Describe the function of the cilia in the respiratory tubes

Asked by admin @ in Biology viewed by 104 persons

Describe the function of the cilia in the respiratory tubes?

Which technology is used in first generation of computer

Asked by admin @ in Computer Science viewed by 164 persons

Which technology was used in the first generation of computers?

Most viewed questions in English


There are ways to spice up one's work amcat

Asked by admin @ in English viewed by 85363 persons


Suxushi pvt company is looking for a laptop passage

Asked by admin @ in English viewed by 34915 persons


Code a contains a set of eight lines

Asked by admin @ in English viewed by 32765 persons


The orchestra has one whistler who plays instruments well

Asked by admin @ in English viewed by 20725 persons


An it company has decided to recruit software developers

Asked by admin @ in English viewed by 17466 persons



Collins english grammar and composition class 6 answer key

Asked by admin @ in English viewed by 17432 persons


New learner's english grammar and composition class 8 solutions pdf

Asked by admin @ in English viewed by 16374 persons


New grammar with a smile class 8 solutions pdf

Asked by admin @ in English viewed by 15569 persons


New grammar plus class 6 solutions by ratna sagar

Asked by admin @ in English viewed by 14608 persons


Reeta and rishika are of the same height

Asked by admin @ in English viewed by 14079 persons



On thursday night a crowd gathered at union square passage

Asked by admin @ in English viewed by 13698 persons


The picture of an ant when enlarged 200 times

Asked by admin @ in English viewed by 13095 persons


Oxford new pathways english book for class 7 solutions

Asked by admin @ in English viewed by 12508 persons


Oxford new learner's grammar and composition class 6 solutions

Asked by admin @ in English viewed by 11821 persons


Total english morning star class 9 icse solutions

Asked by admin @ in English viewed by 11099 persons