Web development and programming
191828 questions • Page 202 / 3837
1. Consider the following array: int[] a = { 1, 2, 3, 4, 5, 4, 3, 2, 1, 0 }; Wha
1. Consider the following array: int[] a = { 1, 2, 3, 4, 5, 4, 3, 2, 1, 0 }; What is the value of total after the following loops complete? a) int total = 0; for (int i = 0; i <…
1. Consider the following array: int[] a = { 1, 2, 3, 4, 5, 4, 3, 2, 1, 0 }; Wha
1. Consider the following array: int[] a = { 1, 2, 3, 4, 5, 4, 3, 2, 1, 0 }; What are the contents of the array a after each of the following loops complete? a. for (int i = 1…
1. Consider the following assembly code: // x at %ebp + 8, n at %ebp + 12 movl m
1. Consider the following assembly code: // x at %ebp + 8, n at %ebp + 12 movl movl movl movl 8(%ebp ) , %esi 12 ( %ebp ) , %ebx $-1, %edi $1, %eax 5.L2 movl and1 xor1 movl sall %…
1. Consider the following assembly language code. The clock frequency is 4 MHz a
1. Consider the following assembly language code. The clock frequency is 4 MHz and all initialization steps have been done correctly (like setting up digital I/O, the oscillator c…
1. Consider the following class declaration: public class Circle { private doubl
1. Consider the following class declaration: public class Circle { private double radius; public Circle(double r) { radius = r; } public double getArea() { return Math.PI * radius…
1. Consider the following class: private class ButtonListener implements ActionL
1. Consider the following class: private class ButtonListener implements ActionListener { public void actionPerformed(ActionEvent evt) { String cmd = evt.getActionCommand(); if (c…
1. Consider the following code (assume proper includes, etc): int main() { (a) W
1. Consider the following code (assume proper includes, etc): int main() { (a) Which statements of the code marked for part (a) are valid, and which statements are invalid? If a s…
1. Consider the following code snippet: public class Vehicle { . . . public void
1. Consider the following code snippet: public class Vehicle { . . . public void setVehicleClass(double numberAxles) { . . . } } public class Motorcycle extends …
1. Consider the following code snippet: public class Vehicle { protected int num
1. Consider the following code snippet: public class Vehicle { protected int numberAxles; . . . } Data in the numberAxles variable can be accessed by ____? a. Only by the Ve…
1. Consider the following code which is supposed to subtract a value passed to t
1. Consider the following code which is supposed to subtract a value passed to the method from an instance variable; however, there is a problem. Re-write this code, without renam…
1. Consider the following code, which is loaded to memory address 0x70008000. Tr
1. Consider the following code, which is loaded to memory address 0x70008000. Translate the highlighted beq and j instructions into hexadecimal-based machine code of MIPS CPU? You…
1. Consider the following data structure and answer the following questions Cust
1. Consider the following data structure and answer the following questions Customer = Customer ID + Customer name + …
1. Consider the following decision table and answer the following questions Rule
1. Consider the following decision table and answer the following questions Rules: 1 2 3 4 5 6 7 8 9 10 11 12 Income H H H H M M M M L L L L Credit Score >= 750 Y Y N N Y…
1. Consider the following declaration: double words[60]; In this declaration, id
1. Consider the following declaration: double words[60]; In this declaration, identify the following: a. The array name: b. The array size: c. The data type of each array componen…
1. Consider the following declaration: int account Num[ 75]; In this declaration
1. Consider the following declaration: int account Num[ 75]; In this declaration, identify the following: a. The array name. b. The array size. c. The data type of each array comp…
1. Consider the following declarations and statements: struct nameType struct co
1. Consider the following declarations and statements: struct nameType struct courseType string first; string last; string name; int callNum; int credits; char grade; struct stude…
1. Consider the following declarations and statements: struct nameType struct co
1. Consider the following declarations and statements: struct nameType struct courseType string first; string last; string name; int cal1 Num; int credits; char grade; struct stud…
1. Consider the following function called duplicate and the main function that c
1. Consider the following function called duplicate and the main function that calls it. What are the values for x, y and z that are displayed? void duplicate (int& a, int&…
1. Consider the following hash function. int hashFunc(int x) { return (x * 2) %
1. Consider the following hash function. int hashFunc(int x) { return (x * 2) % HASH_SIZE; } Assume HASH_SIZE = 10. Here is the hash table’s insert function: void insert(int key) …
1. Consider the following incomplete C++ program: #include int main() { ... } a.
1. Consider the following incomplete C++ program: #include int main() { ... } a. b. c. Write a statement that includes the header files fstream, string, and iomanip in this progra…
1. Consider the following integral: 3.14162 , x in radians 0 Write a VBA program
1. Consider the following integral: 3.14162 , x in radians 0 Write a VBA program to evaluate this integral using Simpson's 1/3 rule. Input the lower and upper limits (3.1416 is ac…
1. Consider the following java code. int x = 5; x++; Give equivalent MIPS ISA. A
1. Consider the following java code. int x = 5; x++; Give equivalent MIPS ISA. Assume compiler will keep x in $s0 ($16). 2. What will be in $8 after executing the following statem…
1. Consider the following lambda expression (\\lambda~x.~(\\lambda~y.y+x) ((\\la
1. Consider the following lambda expression (lambda~x.~(lambda~y.y+x) ((lambda~z.z+x)x) 3) ( x . ( y . y + x ) ( ( z . z + x ) x ) 3 ) What is the outcome after the first reductio…
1. Consider the following method: public static int mystery(int x, int y){ if (x
1. Consider the following method: public static int mystery(int x, int y){ if (x<y){ }else{ } } return x; return mystery(x-y,y); What values are returned for each of the follow…
1. Consider the following microprocessor and memory chips: a. What is the size o
1. Consider the following microprocessor and memory chips: a. What is the size of the microprocessor memory space? b. What the capacity of the EACH memory chips? c. What is the ca…
1. Consider the following packet-filtering firewall. Suppose Alice wants to disa
1. Consider the following packet-filtering firewall. Suppose Alice wants to disallow access to her network 222.22.0.0/16 from the public Internet (rule R3 in the first table below…
1. Consider the following partial timeline of process events Time Event Process
1. Consider the following partial timeline of process events Time Event Process P1 executes the command: Read from disk unit 3 15 P5's time slice expires 18 P7 executes the comman…
1. Consider the following partially complete class: public class TestClass imple
1. Consider the following partially complete class: public class TestClass implements Comparable { private String city; private String state public TestClass( String city, String …
1. Consider the following predicates over the domains A of all animals, CM of al
1. Consider the following predicates over the domains A of all animals, CM of all BC cabinet ministers, and MS of all movie stars. • L(x, y): person x likes person y. • S(x, y): x…
1. Consider the following program: #include main) int flag0 int d,e; dfork ; if(
1. Consider the following program: #include main) int flag0 int d,e; dfork ; if(d 0){ // forkl // fork2 // fork3 // fork4 e-fork ); if e > 0 fork ) else fork if wait (NULL) >…
1. Consider the following pseudocode that simulates rolling a die 5 times: Do th
1. Consider the following pseudocode that simulates rolling a die 5 times: Do the following 5 times: Roll the die. Add value to total. Which statement corresponds to rolling the d…
1. Consider the following recursive function: void recFun(int x) { if (x > 0) {
1. Consider the following recursive function: void recFun(int x) { if (x > 0) { cout << x % 10 << " "; recFun(x / 10); } else if (x != 0) cout << x << e…
1. Consider the following scenario: an IT department at a large company must kee
1. Consider the following scenario: an IT department at a large company must keep information about workstations deployed throughout the company. For each workstation, the followi…
1. Consider the following scenario: an IT department at a large company must kee
1. Consider the following scenario: an IT department at a large company must keep information about workstations deployed throughout the company. For each workstation, the followi…
1. Consider the following scenario: an IT department at a large company must kee
1. Consider the following scenario: an IT department at a large company must keep information about workstations deployed throughout the company. For each workstation, the followi…
1. Consider the following schema: Suppliers(sid: integer, sname: string, address
1. Consider the following schema: Suppliers(sid: integer, sname: string, address: string) Parts(pid: integer, pname: string, color: string) Catalog(sid: integer, pid: integer, cos…
1. Consider the following search method. private static int search (int[] a, int
1. Consider the following search method. private static int search (int[] a, int target, int left, int right) { if (left > right) return 1 else { int midpoint = (left + right) …
1. Consider the following sequence 8, 10, 12,…, n, (n even). (i) How many terms
1. Consider the following sequence 8, 10, 12,…, n, (n even). (i) How many terms are in the sequence? Your answer must be in terms of n. (Count the terms starting with 1 and not 0.…
1. Consider the following set of known facts and rules for a production system.
1. Consider the following set of known facts and rules for a production system. (Check the Forward and Backward Chaining slides in the Rule-Based Systems file in Module 3 for an e…
1. Consider the following set of known facts and rules for a production system.
1. Consider the following set of known facts and rules for a production system. (Check the Forward and Backward Chaining slides in the Rule-Based Systems file in Module 3 for an e…
1. Consider the following set of requirements for a university database that is
1. Consider the following set of requirements for a university database that is used to keep track of students' transcripts. - You are modeling a hospital system. A university is …
1. Consider the following simple program. Give the values printed by the printf
1. Consider the following simple program. Give the values printed by the printf function. #include <stdio.h> int main() { int i,j,k; i=7; j=2; k=5; printf("%d",k>i>j);…
1. Consider the following specification: Define a function find which satisfies
1. Consider the following specification: Define a function find which satisfies the following claim: If x is an integer and xs is a sequence of integers, find(x,xs) is the i…
1. Consider the following statements that are contained in main int [JJinStock s
1. Consider the following statements that are contained in main int [JJinStock s new int [10[4] int [J alpha new int [20] int [ ] beta = new int [20]. int [ J gama (11, 13, 15, 17…
1. Consider the following statements. What is the output if the user enters the
1. Consider the following statements. What is the output if the user enters the underlined string: 100catsin1 2hats? (3 pts) int a, b; char str = [20]; scanf(“%d%s%d”, &a, str…
1. Consider the following tables: AGENCY(AG_CODE, AG_NAME, AG_CONTACT) VOLUNTEER
1. Consider the following tables: AGENCY(AG_CODE, AG_NAME, AG_CONTACT) VOLUNTEER(VOL_CODE, VOL_LNAME, VOL_FNAME, VOL_PHONE, AG_CODE) For the tables given above, work on the proble…
1. Consider the following tables: Book Publisher ISBN Author Title Year 949 A.Gr
1. Consider the following tables: Book Publisher ISBN Author Title Year 949 A.Green Memoirs 2001 287 B.Black Biology 2002 PublisherName ISBN 949 287 Thompson Elsevier (a) Give a t…
1. Consider the following two floating point numbers coded in the 10-bit format
1. Consider the following two floating point numbers coded in the 10-bit format defined in class: x = 1 1010 01101 and y = 1 1001 10110 Do the following: (a) carry out the additio…
1. Consider the following two simple documents. [50 points] (A) precision is ver
1. Consider the following two simple documents. [50 points] (A) precision is very very high (B) high precision is very very very important Assume the only stopwords are: “is", “am…
1. Consider the following two sort methods and the following two search methods.
1. Consider the following two sort methods and the following two search methods. Give the "Big-Oh" time complexity for each method. - merge sort time complexity: ( ) - sequential …
Subject
Web development and programming
Use Browse or pick another subject.