Pre-Summer Sale - Special 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 70dumps

Scripting-and-Programming-Foundations Questions and Answers

Question # 6

Which kind of languages are C and Java?

A.

Machine code

B.

Compiled

C.

Interpreted

D.

Markup

Full Access
Question # 7

A particular sorting algorithm takes integer list [10, 6, 8] and incorrectly sorts the list to [6, 10, 8]. What is true about the algorithm’s correctness for sorting an arbitrary list of three integers?

A.

The algorithm is incorrect.

B.

The algorithm only works for [10, 6, 8].

C.

The algorithm’s correctness is unknown.

D.

The algorithm is correct.

Full Access
Question # 8

Which snippet represents the loop variable update statement in the given code?

integer h = 7

while h < 30

Put h to output

h = h + 2

A.

h < 30

B.

h = h + 2

C.

Put h to output

D.

integer h = 7

Full Access
Question # 9

The steps in an algorithm to build a picnic table are given.

1) Measure and mark the lumber cuts that need to be made

2) Buy the needed materials

3) Determine the needed materials

4) Cut the lumber to the proper dimensions

5) Assemble the pieces and paint.

Which two steps of the algorithm should be switched to make the algorithm successful?

A.

2 and 3

B.

1 and 3

C.

2 and 4

D.

1 and 2

Full Access
Question # 10

What is one task that could be accomplished using a while loop?

A.

When the user inputs a number, the program outputs "True" when the number is a multiple of 10.

B.

The user inputs an integer, and the program prints out whether the number is even or odd and whether the number is positive, negative, or zero.

C.

After inputting two numbers, the program prints out the larger of the two.

D.

A user is asked to enter a password repeatedly until either a correct password is entered or five attempts have been made.

Full Access
Question # 11

A software developer determines the mathematical operations that a calculator program should support When two waterfall approach phases are involved?

A.

Design and Testing

B.

Implementation and testing

C.

Design and implementation

D.

Analysis and design

Full Access
Question # 12

What does a function definition consist of?

A.

The function's argument values

B.

An invocation of a function's name

C.

A list of all other functions that call the function

D.

The function's name, inputs, outputs, and statements

Full Access
Question # 13

A software developer creates a list of all objects and functions that will be used in a board game application and then begins to write the code for each object. Which two phases of the Agile approach are being carried out?

A.

Analysis and design

B.

Design and implementation

C.

Analysis and implementation

D.

Design and testing

Full Access
Question # 14

One requirement for the language of a project is that it is based on a series of cells. Which type of language is characterized in this way?

A.

Functional

B.

Static

C.

Markup

D.

Compiled

Full Access
Question # 15

A programming loam is using the waterfall design approach to create an application. Which deliverable would be produced during the design phase?

A.

A report of customer satisfaction

B.

A list of additional features to be added during revision

C.

A written description of the goals for the project

D.

The programming paradigm to be used

Full Access
Question # 16

Which two situations would be helped by using a programming library?

A.

A programmer needs to write several interacting objects for a student gradebook application, some of which need an inheritance structure.

B.

A programming student is writing code to iterate through the integers in a list and determine the maximum.

C.

A video game programmer needs to perform several animation tasks, all of which are very common in the industry. The programmer does not want to have to code each task. And they are unsure if they a even know how lo code a few of them.

D.

A programmer needs to perform a series of file compression tasks. These tasks are commonly performed by programmers, and the programmer does not want to have to code them all by hand

E.

A programmer is developing a database application that can house various types of data. The software cannot know ahead of time the data type, and so the programmer needs variables that do not require an initial declaration type.

F.

A programmer is writing a piece of mathematical code that requires the heavy use of recursive functions.

Full Access
Question # 17

Which operator is helpful in determining if an integer is a multiple of another integer?

A.

/

B.

$

C.

| |

D.

+

Full Access
Question # 18

Consider the given flowchart.

Question # 18

What is the output of the input is 7?

A.

Within 5

B.

Within 2

C.

Equal

D.

Not close

Full Access
Question # 19

Which output results from the given algorithm?

i = 61

d = 6

c = 0

while i >= d

c = c + 1

i = i - d

Put c to output

A.

1

B.

5

C.

10

D.

60

Full Access
Question # 20

Which two statements describe advantages to using programming libraries?

A.

Using a library minimizes copyright issues in coding

B.

A program that uses libraries is more portable than one that does not.

C.

Using libraries turns procedural code into object-oriented code.

D.

Libraries always make code run faster.

E.

The programmer can improve productivity by using libraries.

F.

Using a library prevents a programmer from having to code common tasks by hand.

Full Access
Question # 21

Which language has extensive support for object-oriented programming?

A.

Markup

B.

HTML

C.

C

D.

C++

Full Access
Question # 22

A software engineer has written a program that uses a large number of interacting custom data types information hiding, data abstraction encapsulation polymorphism, and inheritance Variables do not need to receive their types ahead of time, and this program can run on a variety of operating systems without having to re-compile the program into machine code.

Which type of language is being used? Choose 3 terms that accurately describe the language.

A.

Markup

B.

Interpreted

C.

Object-oriented

D.

Procedural

E.

Dynamic

F.

Static

Full Access
Question # 23

Which three statements describe a characteristic of a programming library?

A.

A library typically must be included before any function in the library is used

B.

A single library normally includes more than one function.

C.

Using libraries will always make a program run less efficiently.

D.

Libraries improve a programmer's productivity.

E.

A single program can only include one library.

F.

One library will contain one function but can have several variables.

Full Access
Question # 24

Which two types of operators are found in the code snippet not (g != S)?

A.

Equality and arithmetic

B.

Assignment and arithmetic

C.

Equality and logical

D.

Logical and arithmetic

Full Access
Question # 25

Which two statement describe advantages to using programming libraries? Choose 2 answers

A.

Using libraries turns procedural code into object-oriented code.

B.

Using a library prevents a programmer from having to code common tasks by hand

C.

A program that uses libraries is more portable than one that does not

D.

Libraries always make code run faster.

E.

The programmer can improve productivity by using libraries.

F.

Using a library minimizes copyright issues in coding.

Full Access
Question # 26

What is the out of the given pseudocode?

Question # 26

A.

6

B.

12

C.

15

D.

18

Full Access
Question # 27

A function should determine the average of x and y.

What should be the function's parameters and return value(s)?

A.

Parameters: x, y. averageReturn value: none

B.

Parameters: averageReturn values: x, y

C.

Parameters: nonsReturn values: x, y

D.

Parameters: x, yReturn value: average

Full Access
Question # 28

Which problem is solved by Dijkstra’s shortest path algorithm?

A.

Given an increasing array of numbers, is the number 19 in the array?

B.

Given an alphabetized list of race entrants and a person’s name, is the person entered in the race?

C.

Given two newspaper articles, what is the greatest sequence of words shared by both articles?

D.

Given the coordinates of five positions, what is the most fuel-efficient flight path?

Full Access
Question # 29

What is a characteristic of an interpreted language?

A.

Is restricted to running on one machine

B.

Generates syntax errors during compilation

C.

Can be run by a user one statement at a time

D.

Has a programmer writing machine code

Full Access
Question # 30

What is a feature of a compiled programming language?

A.

The program usually runs slower than an interpreted language.

B.

The code runs directly one statement at a time by another program called a compiler.

C.

The code must be compiled into machine code in the form of an executable file before execution.

D.

The code does not require being translated into machine code but can be run by a separate program called a compiler.

Full Access
Question # 31

A particular sorting takes integer list 10,8 and incorrectly sorts the list to 6, 10, 8.

What is true about the algorithm’s correctness for sorting an arbitrary list of three integers?

A.

The algorithm only works for 10,6, 8

B.

The algorithm is correct

C.

The algorithm's correctness is unknown

D.

The algorithm is incorrect

Full Access
Question # 32

Which line is a loop variable update statement in the sample code?

Question # 32

A.

integer h = 0

B.

h = h +1

C.

(userInput !=pwd) and (h <= 10)

D.

if userInput == pwd

Full Access
Question # 33

An algorithm should output ‘’OK’’ if a number is between 98.3 and 98.9, else the output is ‘’Net OK’’

Which test is a valid test of the algorithm?

A.

Input 99.9. Ensure output is M98 9 "

B.

Input 98.6. Ensure output is "OK "

C.

Input 99.9. Ensure output is "OK"

D.

Input 98.6. Ensure output is "Not OK ‘’

Full Access
Question # 34

What is a feature of CM as a programming language

A.

The code must be compiled into machine code in the form of an executable file before execution.

B.

The program usually runs slower than an interpreted language.

C.

The code runs directly one statement at a time by another program called a compiler

D.

The code does not require being translated into machine code but can be run by a separate program called a compiler.

Full Access
Question # 35

Which data type should be used to hold the value of a person's body temperature in Fahrenheit

A.

Boolean

B.

Integer

C.

String

D.

Float

Full Access
Question # 36

What would a string be used to store?

A.

A positive whole number

B.

The word "positive"

C.

A true/false indication of whether a number is composite

D.

A positive number between 2 and 3

Full Access
Question # 37

Which statement describes a compiled language?

A.

It runs one statement at a time by another program without the need for compilation.

B.

It is considered fairly safe because it forces the programmer to declare all variable types ahead of time and commit to those types during runtime.

C.

It can be run right away without converting the code into an executable file.

D.

It has code that is first converted to an executable file, and then run on a particular type of machine.

Full Access
Question # 38

What is a characteristic of an interpreted language?

A.

Generates syntax errors during compilation.

B.

Can be run by a user one statement at a time.

C.

Has a programmer writing machine code.

D.

Is restricted to running on one machine.

Full Access
Question # 39

Given integer x = 12 and integer y = 4. What is the value of the expression x - y * 2?

A.

4

B.

6

C.

8

D.

14

Full Access
Question # 40

What is one characteristic of an object-oriented language that is not a characteristic of a procedural or functional language?

A.

The language is based on the concept of modular programming and the calling of a subroutine.

B.

The language is optimized for recursive programming.

C.

The language supports decomposing a program into objects that interact with one another.

D.

The language treats programs as evaluating mathematical functions.

Full Access
Question # 41

What are two examples of equality operators?

Choose 2 answers.

A.

-

B.

==

C.

/

D.

not

E.

<=

F.

!=

Full Access