What is the problem in this code?
Q: The value of BX after executing the following piece of code is : *
A: According to the question, we need to find the value of BX after executing the code: XOR AX, AX ADD…
Q: please try to code them and send the output
A: Since the programming language is not mentioned I have coded this using Python 3.
Q: In the following code, what is init_()?
A: Question 11: Ans: a method __init__ is a method of class Critter
Q: o you mean by Dangling Pointer Variable in C Programming?
A: Dangling pointers : Dangling points in computer programming are pointers to a removed memory…
Q: What is the output of above code.
A: Given: Two Class A and B, in which Class B is derived from Class A. Class B is derived class here.…
Q: ?Explain how the lineto() function works
A: In this problem, we need to explain the lineto() function. Please find the solution in the below…
Q: How does the --> work in dereferencing a pointer?
A: Given: Dereferencing a pointer.
Q: How do you assign a variable’s address to a pointer variable? What is wrong in the following code?
A: Given:- How do you assign a variable’s address to a pointer variable? What is wrong in the following…
Q: What will be the output of the following C# code snippet?
A: WriteLine() method writes contents to console
Q: What do you mean by function overloading? Can you explain it with code?
A: Introduction Polymorphism is an Object-Oriented Programming feature that permits an entity to…
Q: What is the result of multiplying ptr by four? Assuming ptr is an int reference, the following…
A: Multiplying by 4: Find the number you are multiplying by 4 in step one. That quantity in this issue…
Q: How do you make a pointer variable have a variable's address? What's the issue with the code below?
A: We are going to understand how we can create a pointer variable and how we can make it hold a…
Q: The language we are using here is in Racket. Please enter the following code: (cond ((equal? 16…
A: 1) The return value of above code is 18. 2) When we replace all the 16s in the above code with 8 the…
Q: Show an example call to the WriteFile function
A: Example: Calling WriteFile: INVOKE WriteFile, ; write the text to the file fileHandle, ;…
Q: What is the output of following code.
A: Given: Integer s= 4. Integer d=s++; Then d is printed as output. Solution: The priority of post…
Q: Find out the error of the following code and correct it.
A: The given code is: class Equals{ public static void main(String[] args) { int x = 100;…
Q: in this code, what does 2 mean and what does it do?
A: Answer: This Matlab program finds the accel values. First we want to declare 2d array for y. e.g. y…
Q: Write a program that prints pointer values, using casts to all the integer data types. Which ones…
A: There are three integer types long, short, and Converting a pointer into an integer will give us the…
Q: hat exactly is meant by the term "pointer variable"? What is the pur
A: Introduction: Below the describe means of "pointer variable" and the the purpose of it
Q: what is Function Overloading ? How we can implement more then one function in the program with the…
A: Function Overloading: A program has two or more than two same name functions but the parameters of…
Q: Write two programs to implement call by value and call by address using pointers function parameter…
A: Call By Value: In call by value, passing arguments to a function copies the actual value of an…
Q: What is void pointer? Give Example code ?
A: As you have not specified in which language you want the code, therefore the example code in the…
Q: would you rewrite this Python code in Haskell, such that the looping condition and the body of the…
A: Python is a high-level, general-purpose and a very popular programming language. Python programming…
Q: What will be the output of given code, Explain
A: Coded using C++.
Q: Explain pass-by-reference and return-by-reference.
A: Answer: 1.pass-by-reference: to pass the reference of an argument in the calling function to the…
Q: function that returns a pointer to the maximum value of an array of double.
A: Given data is shown below: Write a function that returns a pointer to the maximum value of an array…
Q: What is the value of n3 after the following code is executed:
A: The correct answer is: 14 Here is the explanation: Code Result Explanation: int n1 = 2;…
Q: write the code
A: The code for the problem:
Q: What will be the output of given code.
A: In the given code a char variable ch is initialised with value 'A'. Then in output &ch is…
Q: If a pointer is not pointing anywhere, it’s recommended you have it point to nothing. This is…
A: If a pointer is not initialized and made to point to NULL, then it will point to a garbage value and…
Q: is the output of the following code listing.
A: The method add(Element e) appends e to the end of the list. The method add(int index, Element e)…
Q: what is the difference between void type pointer amd simple pointer?
A: Note: In this question, the coding language is not specified then we are doing this question in the…
Q: Can you write pseudocode for this code?
A: An algorithm is a set of instructions and rules that are required to complete a task. It gives a…
Q: What would be the result of following R code?
A: dim() Function in R: In the R programming language, the dim() returns the dimension of the given…
Q: Explain null, void, wild and pointer to pointer?
A: Function overloading Overloading function is C++ programming feature that allows us to have more…
Q: What are the final values of x and y in this code
A: Q: Output of the given code
Q: Write a c++ code that swaps two input integers using pointers. a. In the main function. b. By…
A: The function declaration would be void swap(int *, int *) ; Here when we call this function from…
Q: What is the output when the following code fragment is
A: First Question: In the cout statement, the expression follows the rules of operator precedence and…
Q: I wrote this c++ program to find min and max, but why does the program say it cannot find the min…
A: #include <iostream>using namespace std; int getmin(int number[], int size){ int…
Q: In the given code below we want to swap a and b. a -What is the problem with code b- Fix the code by…
A: Given Code always @ (posedge clk) begin a=b; b = a; end A) There is a problem with…
Q: what is the difference between pointer and reference? which of these let you modify?
A: Reference is the permanent name of the address. You need to activate the reference at the time of…
Q: Arya has completely learned about function templates and using them in Arrays, her teacher has given…
A: Actually, array is a collection of elements.
Q: Give solution in C ++ Language with secreenshoot of source code. Part 01 In this task, you need to…
A: Since multiple questions have been posted at a single request, we will answer first question. If you…
Q: I'm getting this error for the above code
A: I checked code that is right code for binary search:…
Q: Which operations are not possible with pointers?
A: The answer of this question is as follows:
Q: what is the worst case of the code below
A: Task :- find out the worst case runtime of the given code.
Q: Trace the output of the following code
A: I have provided C++ CODE , CODE SCREENSHOT and output with OUTPUT…
Q: What are the chances that the REpitition code, often known as the Huffman code, will include a…
A: foundation Huffman code, for the most part, is a data compression method. By evaluating the event of…
Types of Loop
Loops are the elements of programming in which a part of code is repeated a particular number of times. Loop executes the series of statements many times till the conditional statement becomes false.
Loops
Any task which is repeated more than one time is called a loop. Basically, loops can be divided into three types as while, do-while and for loop. There are so many programming languages like C, C++, JAVA, PYTHON, and many more where looping statements can be used for repetitive execution.
While Loop
Loop is a feature in the programming language. It helps us to execute a set of instructions regularly. The block of code executes until some conditions provided within that Loop are true.
Step by step
Solved in 2 steps
- Attempt to view the structure of the HOMEWORK13 view.PATHS is a table that contains information about paths on a number line. The structure of PATHS is as follows, where x1 and x2 represent that there is a path from Coordinate x1 to Coordinate x2 (You can't move from Coordinate x2 to Coordinate x1 ). NAME ΤΥΡE NULLABLE X1 INT FALSE X2 INT FALSE Problem Please write an SQL statement that returns the beginning and end point of each path in PATHS . Sort them by the value of the beginning point in ascending order. Constraints • In the case where a direct path from Coordinate a to Coordinate b is available, no path from Coordinate b to Coordinate a will be given. |x1-x2| = 1 • No path will overlap with one another. Example Suppose that PATHS is as follows: x1 x2 1 2 2 3 4 7 7 6 This table can be visualized as follows: START END END START 7 8. 9 Therefore, your SQL statement must return the following: start end 1 4 8 6relation: Book (BookID, Author, ISBN, Title) Write a PL/SQL block of code that performs the following tasks: Read a Book id provided by user at run time and store it in a variable. Fetch the Author and title of the book having the entered id and store them inside two variables Display the fetched book author and title.
- J SHORTAND NOTATION FOR RELATIONAL SQL TABLES Notation Example Meaning Underlined A or A, B The attribute(s) is (are) a primary key Superscript name of relation AR or AR, BR The attribute(s) is (are) a foreign key referencing relation R As an example, the schema R(A, B, C, D, ES) S(F, G, H) corresponds to the following SQL tables: CREATE TABLE R ( A <any SQL type>, B <any SQL type>, C <any SQL type>, D <any SQL type>, E <any SQL type>, PRIMARY KEY(A), FOREIGN KEY (E) REFERENCES S(F) ); CREATE TABLE S ( F <any SQL type>, G <any SQL type>, H <any SQL type>, PRIMARY KEY(F)) EXERCISE Consider the following relational schema, representing five relations describing shopping transactions and information about credit cards generating them [the used notation is explained above]. SHOPPINGTRANSACTION (TransId, Date, Amount, Currency, ExchangeRate, CardNbrCREDITCARD, StoreIdSTORE) CREDITCARD (CardNbr, CardTypeCARDTYPE, CardOwnerOWNER, ExpDate, Limit)…A cake shop named "Whisk" has an online presence. It has multiple flavors of cakes supplied by various vendors. The manager wants to know the cost of the available quantity. Write a sql query to get the total cost of the available cakes. Code should run on Mysql. Data type along with the sample input and output is mentioned below:- Cake: Column Type Cake_Id int Flavor varchar(100) Cost int Producer varchar(20) Stock int Sample Input :- Cake: Cake_id Flavor Cost Producer Stock 1001 Vanilla 450 Just bake 8 1003 Chocolate 500 Flower Aura 12 1004 Red velvet 600 Bakingo 1 1005 Strawberry 700 Bigbasket 2 1006 Cinnamon 900 Creamy 1 1007 Vanilla 900 Creamy 2 1008 Mango 900 Just bake 2 1009 Strawberry 550 Creamy 2 Sample output - 17200ord_no 70001 70009 70002 70004 purch_amt 150.5 270.65 65.26 110.5 ord_date customer_id salesman_id 2012-10-05 3005 2012-09-10 3001 2012-10-05 3002 2012-08-17 3009 5002 5005 5001 5003 Given the Orders Table above: Write a SQL statement to find the highest purchase amount with their ID and order date, for those customers who have a higher purchase amount in a day is within the range 100 and 300.
- Database: CUSTOMER (CustomerID, LastName, FIrstName, Phone, EmailAddress) PURCHASE (InvoiceNumber, InvoiceDate, PreTaxAmount, CustomerID) PURCHASE_ITEM (InvoiceNumber, InvoiceLineNumber, Item Number, RetailPrice) ITEM (ItemNumber, ItemDesciption, Cost, ArtistLastName, ArtistFirstName) Write an SQL statement to show which cutomers bought which items, and include any items that have not been sold. Include CUSTOMER.LastName, CUSTOMER.FirstName, IvoiceNumber, InvoiceDate, ItemNumber, ItemDescription, ArtistLastName, and ArtistFirstName,. Use a join using JOIN ON syntax, and sort the results by ArtistLastName and ArtistFirstName in ascending order. Note that in Microsoft Access this require multiple queries. From Database Concepts 9th Ed. (Kroenke)SQL QUERIES Employees(EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, HIRE_DATE,JOB_ID, SALARY, COMMISSION_PCT, MANAGER_ID, DEPARTMENT_ID,DEPARTMENT_NAME)Department(DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID)Location(LOCATION_ID,STREET_ADDRESS,POSTAL_CODE,CITY,STATE_PROVINCE,COUNTRY_ID) Write a Query in SQL to delete the record of all those cities where city name ends with b fromlocations table.SQL QUERIES Employees(EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, HIRE_DATE,JOB_ID, SALARY, COMMISSION_PCT, MANAGER_ID, DEPARTMENT_ID,DEPARTMENT_NAME)Department(DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID)Location(LOCATION_ID,STREET_ADDRESS,POSTAL_CODE,CITY,STATE_PROVINCE,COUNTRY_ID) Write a query in SQL to display the DEPARTMENT_NAME of all those Departments whoseDEPARTMENT_ID is greater than the DEPARTMENT_ID of Physics department. Write a Query in SQL to show the FIRST_NAME of all those employees whose salary is lessthan the salary of all those employees whose MANAGER_ID is 101 or 102.
- sql queries Employees(EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, HIRE_DATE,JOB_ID, SALARY, COMMISSION_PCT, MANAGER_ID, DEPARTMENT_ID,DEPARTMENT_NAME)Department(DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID, LOCATION_ID)Location(LOCATION_ID,STREET_ADDRESS,POSTAL_CODE,CITY,STATE_PROVINCE,COUNTRY_ID) Write a query in SQL to display the Entire data of All those employees whoseDEPARTMENT_ID is greater than the DEPARTMENT_ID of all those employees who earn morethan 50,000 per month Write a query in SQL to display the minimum, maximum salary and DEPARTMENT_NAMEof all those departments whose minimum salary is greater than 4000 in ascending order.Access Assignment Problem: JMS TechWizards is a local company that provides technical services to several small businesses in the area. The company currently keeps its technicians and clients’ records on papers. The manager requests you to create a database to store the technician and clients’ information. The following table contains the clients’ information. Client Number Client Name Street City State Postal Code Telephone Number Billed Paid Technician Number AM53 Ashton-Mills 216 Rivard Anderson TX 78077 512-555-4070 $315.50 $255.00 22 AR76 The Artshop 722 Fisher Liberty Corner TX 78080 254-555-0200 $535.00 $565.00 23 BE29 Bert's Supply 5752 Maumee Liberty Corner TX 78080 254-555-2024 $229.50 $0.00 23 DE76 D & E Grocery 464 Linnell Anderson TX 78077 512-555-6050 $485.70…SBN Title Author 12345678 The Hobbit J.R.R. Tolkien 45678912 DaVinci Code Dan Brown Your student ID DBS311 Your Name use the following statement to Write a PL/SQL Function that accepts 4 parameters, 2 strings representing students names, and 2 integers representing the marks they received in DBS311. The function will determine which student had the higher mark and return the name of the student. If the marks were the same, then return the word "same" and return "error" if an error occurs or the calculation can not be determined.