I can only write in line 12 unable to add anything to anyother line besides line 12
Q: The following code snippet has an error, how can this be corrected so it prints: 123 Main Street? 1.…
A: EXPLANATION: In the line number 2, there is the concatenation which is performed between two…
Q: In the following code, what is init_()?
A: Question 11: Ans: a method __init__ is a method of class Critter
Q: What is wrong in the following code?t = (1, 2, 3)t.append(4)t.remove(0)t[0] = 1
A: Given: What is wrong in the following code?t = (1, 2, 3)t.append(4)t.remove(0)t[0] = 1
Q: Consider the following code and answer the questions. int ary[] = {5, 2, 7, 6, 8, 4}; Q A: What is…
A: A. Indexing always starts with 0. so the starting index =0
Q: Can #include not be used?
A: #include<conio.h>It is a header file used in c and cpp and it includes inbuilt functions like…
Q: What is the error? 1.int[, ,] arr = new int[3, 2, 2]{{1, 2},{3, 4},{5, 6},{7, 8}}; 2.int[,] hi =…
A: 1. The declaration and the direct initialization of the array's values are not correct because the…
Q: 128H, 144H, 176H, 180H, 129H, 170H bevadeci
A:
Q: Let Z1Z2Z3Z4 be the last four digits of you student ID. • Let RO=0x0000 Z1Z2Z3Z4, R1-0x0000 4500 and…
A: The CMP instruction compares two operands. This instruction basically subtracts one operand from the…
Q: Given list1 = [30, 1, 2, 1, 0] and list2 = [1, 21, 13], what is the return value of each of the…
A: The description of the various operators is shown below.
Q: writ aprogram VBIA visal basie Lor i to 5 Print in this way use 2o08 Version 头头 * 文
A: I give the code in Visual Basic along with output and code screenshot
Q: fix the code
A: In this code, we are printing unique elements of array. So for complete the complete we will take…
Q: What is wrong with the following code? double *firstPtr = new double;…
A: Given: In line 1 and line 2 the pointer variable is declared and memory is allocated. In line 3…
Q: # YOUR CODE HERE # Con
A: 1) Python 3 Code: l=[1,2,3,4,5,7,8]print("Enter the value of…
Q: Is the following code legal? Why or why not? const int DAYS_IN_WEEK; DAYS_IN_WEEK = 7;
A: Given: Is the following code legal? Why or why not? const int DAYS_IN_WEEK; DAYS_IN_WEEK = 7;
Q: Q14: APPEAR (ACCEPTED) WHEN YOU ENTER 12#$12 IN ТЕХТВОХ ?
A: As per Bartleby policy, I am allowed to answer only one question. I am doing 14 as 13 is not of CSE…
Q: 8. Write all data dependences in the following codes a) a = b+ c b = b*2 b = b - 2; d = b + a; c =…
A: Data dependency means that some instruction based on other institutions to execute. For example…
Q: Q2) Write code in VB.NET using "do .. while" to solution the following : 14 25+ xy? j=6
A: VB.NET Code using DO .. While loop to print the sum of series.
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 contains two variables a, b. The given program is used to swap the two integers a and b.…
Q: Given list1 = [30, 1, 2, 1, 0] and list2 = [1, 21, 13], what is the return value of each of the…
A: Given: Given list1 = [30, 1, 2, 1, 0] and list2 = [1, 21, 13], what is the return value of each of…
Q: Question 4 What is the output of this segment? int
A: While doing programming in any programming language, you need to use various variables to store…
Q: c. Write the answers next to each part of the question. Given listl = [30, 1, 2, 1, 0] and list2…
A: Note: Due to company policies I am compelled to solve only one question and that is the first…
Q: Which statement performs overwriting .2 ?assignment x=h+1 O h=e+1 0 e=h+2 X=x+1
A: According to the information given:- We have to choose the correct option to satisfy the statement.…
Q: Write C code to swap two int numbers without using third variabl
A:
Q: On a previous question: "Write a C code that creates an honor list for the top six students at…
A: Explanation: The given program runs without any error. Here, we cross check the program in “Dev…
Q: uest you to put write querry. Don't post wrong querry as always do
A: I have written Querry below:
Q: 2 - Create a procedure that generates a random string of length L, containing all capital letters.…
A: import java.util.*;public class Main { static String getString(int n) { String…
Q: 39 - Which vbScript code creates random integer numbers between -20(included) and 1O(included) ? O…
A: rnd() is used to generate a random number between 0 to 1 cint(), fix() and int() converts to integer…
Q: Question 9 Electrical resistors are said to be connected "in series" if the same current passes…
A: Note :- You have not mention the language of program, so i'm answering your question in C++. Your…
Q: H.W: Write VB code and properties to the following: you have (1 command , 2 listbox, 1 text…
A: Form1.vb: Public Class Form1 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles…
Q: 1. Förmula för cell A15 that adds all data from B1 to D6 2. Formula for cell A16 that determines the…
A: SUMMARY: - Hence, we discussed all the points.
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: Here is the assignment Write a program that prints the multiplication table but inserts a randomly…
A: Program: #include <stdlib.h> #include <iostream>#include <iomanip>using namespace…
Q: Q Write a program to initialize a block of memory starting at 8A000H with English alphabet (A to Z)…
A: Ans:) NOTE: I am solving this using 8086. Here the starting location is 8A000H, and we have to…
Q: In the given code below we want to swap a and b. b- Fix the code by using blocking assignment only.…
A: Verilog code to swap a and b register in content Blocking assignment only non-blocking assignment…
Q: Problem 1: Switcheroo Version 2 Write a program that will reverse the order of words on the given…
A: We can reverse the given string by using the below python program.
Q: int numArray[] = {50, 60, 70, 8, 9}; int *ptr1 = &numArray[3]; int *ptr2 = &numArray[1]; Is the…
A: The correct option is true. Explanation: In function prototype we insure that whenever we want to…
Q: How would you fix this block of code? if(cities[i][j].charAt(0) == "s") System.out.println(cities…
A: Answer in step 2
Q: Which of the following lines of code returns an error?
A: Given:
Q: What is the value of R5 and R6 after executing the code snippet shown below? Assume that the address…
A: The answer is
Q: Which of the following is called insertion/put to operator?
A: Explanation: &lt; stands for the less-than sign: <&gt; stands for the greater-than sign:…
Q: Use the Bash shell for the completion of this project. Develop a shell scripting application that…
A: Given: Use the Bash shell for the completion of this project.Develop a shell scripting application…
Q: You are given a string. Get input from the user. In the first line, print the third character of…
A: As per the requirement program is developed. Note: In the question any programming language is not…
Q: is there another way to write line # 5.
A: The answer to the given question is in subsequent steps.
Q: In this challenge you should repeat a specific given char x times. Create a function that takes a…
A: I give the code in Javascript along with output and code screenshot
Q: Q3\A) Evaluate the following expressions with explanation for each one: (5 only) int x= 10, y=8, z;…
A: && returns true only when both expressions before and after && is true otherwise it…
Q: Consider the following code snipplet, int a[3] = {1, 2, 3}; short *b; b = (short *)a; b++; After…
A: After executing the code, the correct answer to this question is option first 0. Output: -
Q: what is the worst case of the code below
A: Task :- find out the worst case runtime of the given code.
Q: There is a segmentation fault when sorting. Where did I do wrong? The C code is written below…
A: Lets see the solution.
I can only write in line 12 unable to add anything to anyother line besides line 12
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- What is wrong with the following code? double *firstPtr = new double; //Line 1double *nextPtr = new double; //Line 2*firstPtr = 62; //Line 3nextPtr = firstPtr; //Line 4delete firstPtr; //Line 5delete nextPtr; //Line 6firstPtr = new double; //Line 7*firstPtr = 28; //Line 8cout << *firstPtr << " " << *nextPtr << endl; //Line 9The error is in line 52. It should be ( update line 52 with ) if ( exchangeCards == "Y" || exchangeCards == "y" )" This is the answer you gave me the last time. I need line 62! The answer you are giving me over and over again doesn't make sense and it's the same code that doesn't compile! Main.cpp #include <iostream>#include <string>#include <fstream>#include <iomanip>#include <sstream>#include "card.h"#include "deck.h"#include "hand.h"using namespace std;int main(){string repeat = "Y";Deck myDeck;Hand myHand;string exchangeCards;while (repeat == "Y" || repeat == "y"){cout << endl;myHand.newHand(myDeck);myHand.print();cout << endl;cout << "Would you like to exchange any cards? [Y / N]: ";getline(cin, exchangeCards);while (exchangeCards != "Y" && exchangeCards != "y" && exchangeCards != "X" && exchangeCards != "n"){cout << "Please enter Y or N only: ";getline(cin, exchangeCards);}if(exchangeCards == "Y"…Task 2:Modify main() so that it asks the user for a second number to be searched for, and makethe text give an answer like in the example runs based on the return value fromcountElement() instead of counting. Example run: Example runs (user input in bold, comments not partof the output initalic):Number: 5Number: 7Number: 3Number: 9Number: 1Number: 10Number: 8Number: 1Number: 9Number: 7What to search for: 9And another number to search for: 1Both numbers occur in the arrayAnother example, same array as above: What to search for: 9And another number to search for: 13One of the numbers occurs in the arrayYet another example, same array as above:What to search for: 24And another number to search for: 13None of the numbers occur in the array
- HOW CAN I ADD THE FIRST NAME. LAST NAME AND EMAIL ADDRESS TO THE SEARCH LIST? OR CAN YOU USE SWITCH STATEMENT ? THE PROBLEM HERE IS THAT I WANT TO INCLUDE THE FIRST NAME LAST NAMR OR EMAIL ADDRESS TO SEARCH THE PERSON I WANT TO SEARCH void search_person(){ long int phone_1920213; printf("\n\nEnter Phone number of the person you want to search : "); scanf("%ld",&phone_1920213); FILE *fp; fp = fopen("phonebook_1920213", "rb"); if (fp == NULL) { printf("No results! The number you have searched is not of on the list. Plase try again !\n"); //print to continue using the program //press any key to continue printf("\nKINDLY PRESS ANY KEY TO CONTINUE USING THE PROGRAM!\n"); return; } else { int flag = 0; phonebook_1920213 p; while (fread(&p, sizeof(p), 1, fp) == 1) { if(p.contactnum_1920213 == phone_1920213) { printf("FIRST NAME\t\t\t\t SURNAME\t\t…can u check this one?Fix the code
- Could you please help correct else downvote.What are the values of i and j after the following code hasbeen executed and i and j are both set to 15 before the codeis executed?i = ++j;j = i++;Which of the following sets are equal? (Select all that apply.) A = {7, 8, 9} B = {x R| 6 ≤ x < 10} C = {x R| 6 < x < 10} D = {x Z| 6 < x < 10} E = {x Z+| 6 < x < 10}