What is the advantage of using the conditional operator

Assignment Help Basic Computer Science
Reference no: EM13767334

Question 1. Which of the following statement about IDE is true?

IDE only allows programmers to editing their code.

IDE provides editing, compiling, and debugging in one software package.

Visual Studio.Net is not an IDE.

IDE stands for integrated development engine.

Question 2. Which characters make up the stream insertion operator?

:)

::

<<

//

Question 3. Which of the following statements about C++ syntax is true?

Every executable statement must end with a comma.

A block is enclosed inside parentheses.

C++ is not case sensitive.

C++ is case sensitive.

Question 4. To assign a value 1 to variable x, you write _____.

x++;

1 = x;

x = 1;

x == 1;

Question 5. What is the value of x after the following statement?

float x;

x = 3.0 / 4.0 + 3 + 2 / 5 (Points : 4)

1.75

3.75

5.75

4.15

Question 6._____ is often used in the design of a program to describe the program processing.

Pseudocode

Algorithm

Program control

Data flow

Question 7. Which of the following is true about control structures?

Control structures can be part of a flow chart.

Control structures can be part of pseudocode.

Control structures include sequence structure, selection structure, and repetition structure.

All of the above

Question 8. One-way if statements execute an action if the condition is _____.

sent to the console

true

false

within a nested loop

Question 9. A _____ repeats actions while some condition remains unchanged.

repetition structure

control structure

selection structure

sequence structure

Question 10. When should a programmer select a do while loop for his or her program?

When the programmer knows the exact number of times the loop will be executed

When the programmer knows the loop must be executed at least once

When he or she is not sure how many times the loop will be executed

There is no reason to select a for loop. Any loop can be used at any time.

Question 11. The while loop is what type of loop?

Posttest loop

Pretest loop

Infinite loop

None of the above

Question 12. A loop that is inside another loop is called an _____.

outer loop

inner loop

infinite loop

None of the above

Question 13. How does the environment handle a breakpoint when the debugger is running a program?

Stops the program at the line that has the breakpoint, but doesn't execute it

Stops the program at the line of the breakpoint after it has executed it

Runs past the line with the breakpoint but echoes the values in the Trace window

Shows the call stack in the memory window

Question 14. Defining more than one function with the same function name but different parameters is called _____.

function underloading

function overloading

function mimicking

function substitution

Question 15. When a function does not return a value, it is called a _____ function.

void

noid

nill

zero-based

Question  16. Arguments and parameters must match in _____.

data type

numbers of parameters

the order of parameters

All of the above

Question 17. Which function prototype indicates that the parameter is passed by reference?

int myFunction( double &)

int myFunction(double)

int myFunction(double *)

int myFunction(&)

Question 18. What would be a valid argument for the following function

char myFunction(int &x)

int myVariable;

char myVariable;

All of the above

Question 19. What type of menu first displays the main menu and then, based on the user's selection, displays a submenu?

Single-level menu

Multiple-level menu

Step-level menu

Sublevel menu

Question 20. What is not part of the menu valued selections process?

Input validation loop

Including the default clause in the case structure

State

Use of an else clause

Question 21. A(n) _____ represents an entity in the real world that can be distinctly identified.

class

function

object

method

Question 22. Bug errors are _____ errors.

logic

syntax

binary

asp.net

Question 23. Which of the following is false?

All elements of the array have the same data type.

All elements in an array have the same name.

All elements in an array have the same subscript.

The first element of the array has a subscript of zero.

Question 24. Programmers often mistakenly reference the first element in an array with index1. What is this called?

Logic-error

Index1-error

Off-by-one-error

N-1

Question 25. A five-row, six-column array has a total of how many elements?

One

36

30

11

Question 26. Given the following array

int profit [5] = {10, 20, 31, 55, 66};

The following statement would replace which value?

profit [4] = profit[1] + 3;

55 with 13

66 with 13

66 with 23

55 with 23

Question 27. An array of characters is known as a _____.

character set

string

constant

character matrix

Question 28. Files to which data is written are known as _____.

output files

input files

active files

sequential files

Question 29. In terms of storage and retrieval of data, sequential access files are similar to _____.

floppy disks

books

hard disks

cassette tapes

Question 30. When reading data from a sequential file, the data will be read _____.

in alphabetical order

sorted from smallest to largest

in key field order

in the order in which it was written

Question  31. Create a writeData method snippet of code using NAME and State as variables. Collect the information and write it to file.

Question 32. Explain what a default constructor is and why it is used. Provide code segment to illustrate a simple class, create a constructor method to intialize a private property, and demonstrate how a object would be instantiated with your constructor.

Question 33. Explain how to declare and assign values to a two-dimensional array and provide a C++ program segment that illustrates your answer. Provide a summary of how the values are stored.

Question 34. In your own words, define a function and code an example of creating a function and calling it.

Question 35. Using a loop, write a program that reads in exactly five integers and outputs the sum.

Question 36. What is the advantage of using the conditional operator?

Question 37. Explain the rules of operator precedence and how an expression using numeric values and operators would be evaluated.

Reference no: EM13767334

Questions Cloud

What do you see as future of delinquency prevention programs : What do you see as the future of delinquency prevention programs that might promise the greatest impact for young people today
What social engineering and physical security aspects : What sort of attacks would work in this case. Give some examples and how you would carry them out. What social engineering and physical security aspects were discovered/devised. Give a detailed explanation.
Write a movie reviwe about the japanese movie samurai : Write a movie reviwe about the japanese movie "samurai".
Determine the value of prevention : How do you determine the value of prevention? How do you prioritize prevention and rehabilitation? This week you reviewed delinquency prevention
What is the advantage of using the conditional operator : What is the advantage of using the conditional operator. Explain the rules of operator precedence and how an expression using numeric values and operators would be evaluated.
Disease associated with poor nutriotion : Describe some illnesses or problems the safety issues might cause and ways to prevent these illnessess or problems.
Explain most beneficial characteristics of cloud-computing : Explain what you believe are the two most beneficial characteristics of cloud-computing from an organizational perspective.
Describe the direction of the force : 1. A scooter and a rider together have a mass of 275kg. If the scooter slows with an acceleration of -4.50 m/s²:a. What is the net force of the scooter and the rider together? b. Describe the direction of the force and the meaning of the negative sig..
Environmental issues and thier emergency responders : When emergency responders suspect that a package may contain an explosive, which of these actions should they NOT do

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Examine and assess the main computing problems

Use at least three (3) quality resources in this assignment. Note: Wikipedia and similar Websites do not qualify as quality resources.

  Decreasing risk of malicious attacks in personal systems

Security budgets is devoted to decreasing risk of malicious attacks. What threats are you aware of when it comes to the personal systems and systems at job

  Program that reads a series of whitespace

Write a program that reads a series of whitespace delimited strings from stdin and prints them back out, separated by spaces, in lexicographic order. You may assume that all strings are lower case and that no string has more than 20 characters.

  Implement a simple automated bank registry system

Implement a simple automated bank registry system. The implementation will include several attributes related to a transaction, and the data will be managed in a global linked list within memory.

  What do you recommend he do about making a backup

What do you recommend he do about making a backup - The chief financial officer (CFO) of NCWR keeps a huge number of reports, spreadsheets, and other critical financial information on his computer

  Write a program segment that translates an integer value

Write a program segment that translates an integer value into a letter grade. Between 90 and 100 the segment should output 'A', between 80 and 89 it should output 'B', between 70 and 79 it should output 'C', between 60 and 69 it should output 'D' ..

  What max number of dimensions a c++ multidimensional array

What is the MAX number of Dimensions for a C++ multidimensional array ?

  How you would overcome these challenges

You are the CIO for Rapid Cargo, a shipping company specializing in delivering large items quickly - Show the issues that managing and implementing the technology architecture you would have and how you would overcome these challenges.

  Assume the sequence numbers are properly sized

What suggestions would you make to your colleague to fix the protocol? Assume the sequence numbers are properly sized.

  Type of change process

General Electric established its Work-Out process in the early 1990s. It continues to be a mainstay in GE's efforts to initiate change. In the interim years, the Work-Out process has also been adopted by such diverse organizations as General Motor..

  What is a packet? what is packet switching

What is a packet? What is packet switching?How would you explain the concept of packet switching?What are the advantages and disadvantages of packet switching over circuit switching?

  Did the city make the right decision to left town

Aabout 300,000 bills would have had to have been examined. Some residents left town, and the individual refunds were not that large. Did the city make the right decision?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd