# Code a contains a set of eight lines

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?​

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

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

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: 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

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

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?

2

2

B

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

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.

## Which nucleic acid contains the coded instructions for making proteins

Which cell organelle contains coded directions for production of proteins? Question 3 options: endoplasmic reticulum lysosome Golgi apparatus nucleus

## Line cd contains points a (4, −7) and b (4, 8). the slope of line cd is

Asked by maham237 @ in Mathematics viewed by 371 persons

## Line ab contains points a (8, −4) and b (1, −5). the slope of line ab is

Asked by maham237 @ in Mathematics viewed by 337 persons

## Line ab contains points a (0, 1) and b (1, 5). the slope of line ab is

Asked by maham237 @ in Mathematics viewed by 323 persons

Line AB contains points A (0, 1) and B (1, 5). The slope of line AB is −4 negative 1 over 4 1 over 4 4 I'm thinking it's D. …

## You use a line of best fit for a set of data

Asked by maham237 @ in Mathematics viewed by 302 persons

You use a line best fit for a set of data to make a prediction about an unknown value. The correlation coefficient for your data set is -0.015. How confident …

## A line contains points m(1, 3) and n(5, 0). what is the slope of mn?

Asked by maham237 @ in Mathematics viewed by 423 persons

## Line ab contains points a(4, 5) and b(9, 7). what is the slope of ?

Asked by maham237 @ in Mathematics viewed by 475 persons

## Line ab contains points a (3, −2) and b (1, 8). the slope of line ab is

Asked by maham237 @ in Mathematics viewed by 319 persons

## Line qr contains (2, 8) and (3, 10) line st contains points (0, 6) and (−2, 2). lines qr and st are

Asked by maham237 @ in Mathematics viewed by 342 persons

Line QR contains (2, 8) and (3, 10) Line ST contains points (0, 6) and (-2, 2). Lines QR and ST are (4 points) Select one: a. parallel because the …

## How many iambs per line does a shakespearean sonnet contain?

Asked by jaiden98 @ in English viewed by 346 persons

## How to use a set square to draw perpendicular lines

With a line 7 cm long. Use a set square and a ruler and draw perpendicular lines at both ends

## How many iambs per line does a shakespearean sonnet contain

How many iambs per line does a Shakespearean sonnet contain? two iambs three iambs four iambs five iambs

## Which contains the character's lines and dialogue for a video

Asked by maham237 @ in English viewed by 322 persons

a location list a storyboard a shooting script a shooting schedule

## Find the slope of the line containing the given points

Find the slope of the line that contains the following pairs of points (2,4) (0,8)

## A fixed verse poem contains lines that are in length

Asked by maham237 @ in English viewed by 368 persons