Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask C/C++ Expert


Home >> C/C++

1. Analyze the following pseudocode. Whats the ansr's final value ?

Num = 8 ansr =0 if num > 5 then if num < 20 then ansr =1 else ansr = 2 endif endif .

A) 0

B) 1

C) 2

D) 7

2. Which piece of pseudocode represent the checking the loop condition

A) rep = 1

(B) rep=rep +1

(C) while (rep< 5)

(D) print " warning "

3.In a control break routine, how do you know when the last category has finished being processed ?

A) at the end of the file

B) when every category is the same

C) when the value of the category is the same as the vale of the control break field

D) there is no way to tell

4.Which of the following is another name for an array?

A) group

B) sequence

C) matrix

D) subscript

5) What piece of pseudocode represents incrementing the loop control variable.

A) rep = 1

B) rep=rep + 1

C) while (rep<5)

D) print "warning "

6) Which of the following is a nontrivial true example of the greater than or equal to operator ?

A) 1> 5

B) 1> = 5

C) Time =3

D) Time > = 4

8) In order to have the most efficient program, which question should be asked first when working with an AND decision.

A) the one that is less likely to be true

B) the one that is more likely to be true

C) the one that involves fewer comparisons

D) the one with the lower valve

9) When listing employees who make more that $10 and less than $12 per hour, you are making a decision bases on a:

A) Range

(B) row

(C) variable

(D) value

10) When a loop control variable is not altered during loop execution, a(n) __________ loop may result.

A) decrement

B) infinite

C) indeterminate

D) default

11)In the following pseudocode sample which will be printed if the value of empDept is 11?

If empDept >=8 the
superviorName = "Fontana
else
if empDept > = 4 then
supervisorName = "Escher "
else
supervisorName + "Dillion"
endif
endif
print supervisorName

A) Fontana

B) Escher

C) Dillion

D) Nothing

11)Which of the following is true of a structured loop

A) the loop can exit from any point

B) the loop body must execute at least one

C) the loop condition represent the only exit from the loop

D) the loop can repeat an infinite number of times

12)When creating a grand total by adding up several subtotals you are

A) rolling up the totals

B) grouping the totals.

C) grabbing the totals

D)grand totaling.

13) What is the term for each part of an array

A) variable

B) element

C) subscript

D) superscripts

14)Array subscript are always

A) large numbers

(B) characters

(C) negative values 3

(D) integers

15)What do array elements all have in common

A) pointer

B) memory location

C)data type

D) default value

Question 15-17

X =1
FoundIt ="N" then
While x< 7
If custItemNo = validItem[x] then
foundIt = "Y"
endif
x =x+1
endwhile
if foundIt ="N" then
print "No such item"
endif

15) In the above code which of the following is a flag variable

A) foundIt

B) x

C) custItemNo

D) validItem

16) In the above code which of the following is an array variable

A) foundIt

B) x

C) custItemNo

D) validItem

17) In the above code , which of the following is the variable being searched for.

A) foundIt

B) x

C) custItemNo

D) validItem

18) If the array list has 4 elements then the statement, then the statement list [5] is:

A) valid

B) out of bounds

C) out of range

D) equal to zero

19) In a for loop, a(n) _____ value is used to control how the loop control variable is incremented.

A) step

(B) group

(C) flag

(D) sentinel

20) A while loop has a(n) _____ condition.

A) posttest

B) pretest

C) infinite

D) incremental

21)Array subscripts must be :

A) negative

B) greater than zero

C) sequential

D) with decimal places

Attachment:- programming essentials(help 2).zip

C/C++, Programming

  • Category:- C/C++
  • Reference No.:- M91610578
  • Price:- $20

Priced at Now at $20, Verified Solution

Have any Question?


Related Questions in C/C++

Why do researcher drop the ewaste and where does it end

Why do researcher drop the ewaste and where does it end up?

Software development fundamentals assignment 1 -details amp

Software Development Fundamentals Assignment 1 - Details & Problems - In this assignment, you are required to answer the short questions, identify error in the code, give output of the code and develop three C# Console P ...

1 implement the binary search tree bst in c using the node

1. Implement the Binary Search Tree (BST) in C++, using the Node class template provided below. Please read the provided helper methods in class BST, especially for deleteValue(), make sure you get a fully understanding ...

Project - space race part a console Project - Space Race Part A: Console Implementation

Project - Space Race Part A: Console Implementation INTRODUCTION This assignment aims to give you a real problem-solving experience, similar to what you might encounter in the workplace. You have been hired to complete a ...

Question 1find the minimum and maximum of a list of numbers

Question: 1. Find the Minimum and Maximum of a List of Numbers: 10 points File: find_min_max.cpp Write a program that reads some number of integers from the user and finds the minimum and maximum numbers in this list. Th ...

What are the legal requirements with which websites must

What are the legal requirements with which websites must comply in order to meet the needs of persons with disabilities? Why is maximizing accessibility important to everyone?

Assign ment - genetic algorithmin this assignment you will

ASSIGN MENT - GENETIC ALGORITHM In this assignment, you will use your C programming skills to build a simple Genetic Algorithm. DESCRIPTION OF THE PROGRAM - CORE REQUIREMENTS - REQ1: Command-line arguments The user of yo ...

There are several ways to calculate the pulse width of a

There are several ways to calculate the pulse width of a digital input signal. One method is to directly read the input pin and another method (more efficient) is to use a timer and pin change interrupt. Function startTi ...

Assignment word matchingwhats a six-letter word that has an

Assignment: Word Matching What's a six-letter word that has an e as its first, third, and fifth letter? Can you find an anagram of pine grave. Or how about a word that starts and ends with ant (other than ant itself, of ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As