please try to code them and send the output
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: Which of the following is True about the following code
A: The correct answer is option 2: removing the PTR operator will cause an error because PTR is used to…
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: The code shown below is completely correct and has no errors
A: This code has errors. Variables a1 and a2 are not declared in the scope. So this code throw errors.
Q: Which of the following programs will NOT cause an error?
A: In Python, functions are declare using def keyword
Q: What's wrong with this code? i=31 whileți<=50): printți) A There is a problem with the…
A: The answer is given below:-
Q: - Show the printout of the following code:
A: bool b = true;int i = b; cout << b << endl;cout << i << endl;
Q: Evaluate the following postfix expression: 10 5 + 2 * 3 3 / %
A: 10 5 + 2 * 3 3 / % FINAL ANSWER IS 0 . Step 1 - Firstly Push the 10 and 5 into the stack . Step 2 -…
Q: What is printed by the following code segment?
A: The correct is ("cow?now?how?brown?") Option("D") Explanation If the break statement is located…
Q: Consider the following code fragment. What is the output for each of the Following input values for…
A: In the question, as we are provided with 5 inputs for 'n' so we have to tell the corresponding ouput…
Q: how to fix this error code
A: Required:
Q: please write a code for that
A: Since the programming language is not mentioned, I have coded above question Python. Follow the…
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: Fix all the errors in the following code by filling in the table below and display the output after…
A: Given: Required: find the error in the code
Q: Complete the code as below mentioned. Write all
A: Here, in this question, we are asked to develop a GO code. It is stated that the amount of potatoes…
Q: When does this code segment return true? a. When all int values in nums are greater than or equal to…
A: The given problem has a for loop segment that analysis the array elements. The requirement is to…
Q: What is the output of the following code:
A: There is an Compiler error because default arguments are the leftmost arguments. Correction in code…
Q: The following code will print Int x=10; Printf(“x=%d”,x++);
A: x++ means first we use the assigned value and then increment it after the use.
Q: 5. Rewrite the following code using a switch statement.
A: Approach Here, we are asked to replace if else-if with a switch statement. We will use the switch…
Q: What is the output of the following code
A: Required: programming
Q: What does this code print? Print (2**2**3*2)
A: ** represents exponent and has higher precedence than any other operator These exponents are nested…
Q: Find error in the code given below
A: Given code is C language code in which an integer variable n is declared and program is aimed to…
Q: What will be the output for a and b given the below code segment?
A: given: c++ code required: to run the code and provide output and value of a and b.
Q: Please fix this code:
A: where is your code please uploade the question in a write way you have not shareed the code
Q: Find the error in the following code
A: Please upvote. I am providing you the correct answer. You can never, in no context, change an…
Q: Identify and fix the errors in the following code:
A: The java.lang.Math.random() returns a double value with a positive sign greater than or equal to 0.0…
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: 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: Rearrange the code, all necessary code is already listed
A: from _collections import defaultdictdef wiz_study_length(prereq_list,final = 'WIZ90001'):…
Q: What does the following code segment do? for i in range(5) : x.append(C[ ]) for j in range(3) :…
A: In the first line x=[] an empty list is created. Then in the next line, 5 empty lists are added to…
Q: What are the outputs of the following code?
A: Required: What are the outputs of the following code?
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: Convert the following code into descriptive code, and verify using White Box Testing.
A: White Box Testing White Box Testing is software testing technique in which internal structure,…
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: Please create a code that solves for matrix addition and matrix scalar multiplication. The code for…
A: Answer: I have done code in python as also I have attached code
Q: What is the output of this code
A: In this question, a code segment is given and we are asked to give the correct output Given Code:
Q: What is the output of the :following code
A: C++ programming language is known to be case sensitive which means uppercase and lowercase letters…
Q: c1 ='a'while c1 <'b': c2 ='a'while c2 <='c':print('{}{}'.format(c1, c2), end=' ') c2 =chr(ord(c2)+1)…
A: Output of the above code is
Q: Examine the following codes and evaluate what will be the output. Write the output in the space…
A: Program Explanation: A class with main method is defined Three integer variables are declared and…
Q: Which of the following lines of code returns an error?
A: Given:
Q: Complete the convert() function that casts the parameter from a float to an integer and returns the…
A: Given: To write a function convert () that casts the float to int and then return the result.
Q: output is produced when previous1 = 1,
A: Given :- In the above question, the algorithm is mention in the above given question Need to write…
Q: write the missing code
A:
Q: I'm getting this error for the above code
A: I checked code that is right code for binary search:…
Q: Given the following code what will be the output?
A: Java is a programming language. It contains extensive libraries (package). It can be used to create…
Q: A1. Find the output of the following code in order.
A: Here, the concept of constructor chaining is used. Constructing an instance of a class invokes or…
Q: what is the worst case of the code below
A: Task :- find out the worst case runtime of the given code.
please try to code them and send the output
Step by step
Solved in 4 steps with 2 images
- Task - Using pointers to process arrays (C Languaage) In a TV show, each minute can be either interesting or boring. Assume that if 7 consecutive minutes are boring, then an average viewer will stop watching the show. Write a C program that calculates how many minutes that an average viewer will watch a TV show, given the interesting minutes. Assume the TV shows are 45 minutes long. Requirements Name your program project4_minutes.c. Follow the format of the examples below. The program will read in the number of interesting minutes, then read in the interesting minutes. The program should include the following function. Do not modify the function prototype. int find_minute(int *minutes, int n); minutes represents the input array for interesting minutes, n is the length of the array (the number of interesting minutes). The function returns the how many minutes an average viewer will watch the show. This function should use pointer arithmetic– not subscripting – to visit array…(Card Shuffling and Dealing) Create a program to shuffle and deal a deck of cards. Theprogram should consist of class Card, class DeckOfCards and a driver program. Class Card shouldprovide:a) Data members face and suit of type int.b) A constructor that receives two ints representing the face and suit and uses them to initialize the data members.c) Two static arrays of strings representing the faces and suits.d) A toString function that returns the Card as a string in the form “face of suit.” Youcan use the + operator to concatenate strings.Class DeckOfCards should contain:a) An array of Cards named deck to store the Cards.b) An integer currentCard representing the next card to deal.c) A default constructor that initializes the Cards in the deck.d) A shuffle function that shuffles the Cards in the deck. The shuffle algorithm shoulditerate through the array of Cards. For each Card, randomly select another Card in thedeck and swap the two Cards.e) A dealCard function that returns the next…Language: C++ Create a class called publication that stores the title (char array) and price (float) of a publication. From this class derive two classes: book, which adds a page count (int) and tape, which adds a playing time in minutes (float). Each of the three classes should have a getdata() function to get its data from the user using input from the keyboard and a putdata() function to display the data.Write a main function that creates an array of pointers to publication. In a loop, ask the user for data about a particular type of book or tape to hold data. Put the pointer to the object in the array. When the user has finished entering data for all the books and tapes, display the resulting data for all the books and tapes entered, using a for loop and a single statement such as: pubarr[j] -> putdata(); To display the data from each object in the array.
- c++ coding language I need help with part B and C please. If you are unable to do both, then PLEASE prioritize part C. I am really stuck and really can use the help. This is the code for c that was provided in order to guide me: const int N =31; // N parking spaces bool parking[N]; // the garage void EmptyTheLot(bool parking[], int N) { for(int i=0; i<N; i++) p[i]=false; // empty space } // returns -1 if no space found, //otherwise it returns 0<=i<N for a valid space. int FindSpace(int PlateNumber, bool parking[], int N) { // ????? } main() { EmptyTheLot(parking, N); // start with an empty parking garage. // get plate numbers and fill lot. }Order check Write a program OrderCheck.java that takes four int command-line arguments w, x, y, and z. Define a boolean variable whose value is true if the four values are either in strictly ascending order (w < x < y < z) or strictly descending order (w > x > y > z), and false otherwise. Then, display the boolean variable value.T/F The << operator is overloaded to input data items of fundamental types, strings and pointer values
- Complete C++ source code for Write a complete C++ program to help the manufacturer determine the greatest profit obtainfrom making tables and chairs with a given number of M type A and N type B wood blocks.• The program should prompt the user to input M and N.• Then tabulates all the combinations of tables and chairs possibly made, and calculatesthe profit obtain using array.• The program should also identify the greatest profit and make a concluding remark.• The program should be written in modular form with the main() function calling otherfunctions. If arrays are involved in the function, the arrays should be passed into thefunction as parameters.• Lastly, display the output to an external .txt file.Circle Properties Write a program that prompts for and accepts the diameter of a circle as a floating point number. The program should calculate and output the area and circumference of the circle. A sample run of the program should look like this: Enter circle diameter: 2.5 The area is 4.91 and the circumference is 7.85. Use 3.14159 as your constant for pi. global main ; exposes program entry point to the linkerextern printf ; declare external functionextern scanf section .text ; start of code segment main: push rbp ; preserve base pointer mov rbp,rsp ; copy stack pointer to base pointer pop rbp ; restore base pointer mov rax, 0 ; exit status (0 = success) ret section .data ; start of initialized data segment section .bss ; start of uninitialized data segment section .dataprompt db "Enter circle diameter: ", 0format db "The area is %0.2f and the circumference is %0.2f.", 0pi dq 3.14159…Problem Statement: The mathematician Conway imagined a game, called game of life, which considered cells that are susceptible to reproduce, disappear, or survive when they obey certain rules. These cells are represented by elements on a grid of squares, where a grid has an arbitrary size. Thus, each cell (except those on the boundaries of the grid) is surrounded by eight squares that contain other cells. The rules are stated as follows: 1. Survival: Each cell that has two or three adjacent cells survives until the next generation.2. Death: Each cell that has at least four adjacent cells disappears (or dies) by overpopulation. Also, each cell that has at most one adjacent cell dies by isolation.3. Birth: Each empty square (i.e., dead cell) that is adjacent to exactly three cells gives birthto a new cell for the next generation.It is worth noting that all births and deaths occur at the same time during a generation. Write a program that simulates this game and displays all successive…
- C++ Coding: ArraysTrue and False Code function definitions for eoNum() and output(): Both eoNum() and output() are recursive functions. output() stores the even/odd value in an array. Store 0 if the element in the data array is even and store 1 if the element in the data array is odd. eoNum() displays all the values in an array to the console.C++ Create a class Student that contains three members: roll no, name and mark, and three functions. Write a first inputStudent() function to get data of student class. Write a second getMark() function that returns a student’s mark. Write a third display() function that displays a student’s data. In a main() function, you need to declare 40 students and get data of all students by using inputStudent() function. And also use a pointer array to keep all students by mark greater than 50 and display the searching data of each student in that pointer array (Use the access operator -> to access a pointer points to member functions of the Student class).Student Registration System is an approach that enables colleges and universities to better supervise a growing number of enrollments. Create a menu system for registration program in c++ that asking an input based on the choices below. If the input is A then the program will ask for name and program (course) store in two arrays, if B then the program will display all the data stored on the array and the program will be terminated only if the input is E. Apply also function on the program: Menu System – 1st Way of Function Add Student – 4th Way of Function Example: REGISTRATION SYSTEM: A - Add Student B - View ALL E - Exit Choose: A Name: Sebastian Program: CE REGISTRATION SYSTEM: A - Add Student B - View ALL E - Exit Choose: B Name Program Carlo - CE Sevi - CE