1. int i1; what is the value of int1? a. 0 b. null c. can not tell from the info given 2. Temporarily changing one data type to another is known as ________________. a. typecasting b. intimidation c. constructing d. variable casting
Q: Can you change a bit of the code to out put the monthly rent with two decimals. Thanks! #include…
A: In the given problem, we have provided the C++ Code. In this code, our task is to modify the code so…
Q: 13 - final question Given the following Windows Form Application Calculator 2 3 4 5 6 8 9 And given…
A: Inside the one_Click() method, If the value in textbox1 is 0, then the value in textbox1 is set to 1…
Q: QUESTION 12 Given a code snippet below. What is the content of variable wide? float final (int a) {…
A: We are given a code and we are going to find output of it. Please refer image for clear solution.
Q: What is the stored in the object obj in following lines of Java code?
A: Question. What is the stored in the object obj in following lines of Java code? box obj;
Q: Given the following method, which line of code correctly calls the method and copies the returned…
A: Required: Given the following method, which line of code correctly calls the method and copies the…
Q: Declare each of the following variables as type int in JShell to determine which are valid and which…
A: Please find the answer below :
Q: What is the output of the following program? void MyFun(int z) { printf("%d ", z); z++; } int…
A: void MyFun(int z){printf("%d ", z);z++;}int main(void){int z = 2;MyFun(z);MyFun(z);} MyFun(2)…
Q: Which can pass the returned value of a value-returning method (named getIt) to a variable (named…
A: A variable can be assigned a value while declaring the variable which is known as variable…
Q: Given the following method, which line of code correctly calls the method and copies the returned…
A: answer d) diff=difference(x,y); here we are calling function by passing x , y parameters to the…
Q: eate a class named as Integer by using a logical NOT operation that converts the positive number in…
A: import java.util.*;public class Main{ public static void main(String[] args) { Scanner sc=new…
Q: 4- If a logical expression is true, it will always return a logical I and if it's false, it'll…
A: Please upvote. Thanks
Q: 6. Which of the below code contains correct overloading code? Why would the other won't work? Code 1…
A: Code 1 is the correct overloading code. When we make a function call to an overloaded function, to…
Q: Create a file named Temperature.java. I’m that file create a method with the following signature:…
A: CODE:- import java.util.*; class Temperature{ public static void main(String args[]) {…
Q: Which of the following is the correct syntax to declare an array of ten integers? O int [] a = new…
A: Array Declaration syntax datatype[] array_name = new datatype[SIZE]; In the Question it is asked,…
Q: Which of the following is the correct lambda expression in java that adds two numbers and returns…
A: import java.util.Scanner; interface Sum { // functional interface int…
Q: What is the error in the code below? my_struct_t *bar; /* ... do stuff, including setting bar to…
A: Question. What is the error in the code below? my_struct_t *bar; /* ... do stuff, including…
Q: QUESTION 10 Which is the output of the following code segment? int e = 5, f= 10; iffe <f|f<0)…
A: Code: using System;class HelloWorld { static void Main() { int e = 5,f=10;/*initialising…
Q: Suppose that the input is 20 –16 –5 15 6 0. What is the output of the following code? (2, 3) Submit…
A: Given program: #include <iostream> using namespace std; int main() { int num; int temp=0;…
Q: /** * You have a golden lottery ticket, with * ints a, b, and c on it. If the numbers are all…
A: public static int goldenTicket(int a, int b, int c) { if(a == b && b == c) return 20;…
Q: Learn C# beginner programming - Simple code - Im stuck on the Date format. Im creating a int for…
A: Literal is a numeral constant or string constant value set to the integer variable and string…
Q: How many times will the following code will print "Final Test"? three times none one time four times
A: In the do-while loop, first of all, the body of the loop is executed and then the condition is…
Q: If, after the following JavaScript code executes, the value of toppings is ["cheese", "mushrooms",…
A: The pop() method removes the last element of the array. It returns the removed element The sort()…
Q: What is going to be the output of these codes after clicking on button1? Public Class Form1 Dim…
A: Correct ans is d Ans 23
Q: QUESTION 23 Which statement copies the contents of sw to userlnput? StringWriter sw = new…
A: sw contains the string and pw prints them
Q: 1. Assume x is an int which has been declared and assigned a valid value. x guaranteed to change…
A: The given code is used the multiple if statement, in which control is evaluate both if statement…
Q: code is giving issues need help figuring it out. I posted the code and project prompt. Thank you!…
A: Basically, the code is working absolutely as far the logic is concerned. Only some syntax errors…
Q: Can you please get the output of this code Public Class formLoan Private Sub btnClear_Click(sender…
A: The actual piece of code needed to display the potential savings If dispSaving.Checked = True ThenIf…
Q: According to the following, which is not a valid way to call the displayIt method? private int…
A: Given data is shown below: According to the following, which is not a valid way to call the…
Q: he following code is intending to create a computer object with 5 USB ports and the color is…
A: Here the correct option is (c)
Q: Which one of these statements is not true? An if statement does not need an else statement…
A: Java is a programming language. It contains extensive libraries (package). It can be used to create…
Q: I'm stuck on this question and I don't know how I should be approaching this. What should I do? My…
A: The program makes a class Student and a nested class GPA. The members of class Student includes name…
Q: Q1. Which of the following is an example of Autoboxing? a) int avar = 10; Integer bvar = new…
A: Autoboxing is process of creating object of primitive data type and storing it in object of wrapper…
Q: public class DebugEight2 { publicstaticvoidmain(Stringargs[]) { int[] someNums = {4,17,22,8,35}; int…
A: public class Main{public static void main(String[] args){int[] someNums = {4,17,22,8,35};int tot =0,…
Q: 2. Declare variables to store a first name and a last name, and initialize with your own first name…
A: Declare variables to store a first name and a last name, and initialize with your own first name and…
Q: You are allowed to use Wing101 Write a Phyton script that asks the user for their age and returns…
A: Python is an interpreted high-level general purpose programming language.
Q: Which of the following of statement/s is/are false? * I. All white-space characters (blanks) are…
A: Wrong option true option is below step
Q: What does this code produce? FOR varName, DWORD varName ENDM
A: It is used to Create Five (monday,tuesday,wednesday,thursday,friday) DWORD variable. Here Each…
Q: Imagine you have an app that asks the user to enter his/her age using the keyboard. When your app…
A: func checkAge(userAge: String) { // Function takes in a string var a:Int? = Int(userAge)//…
Q: Executions main.e 3. Sum of My Winnings 1 Fincludecstdio.ho by CodeChum Admin 3- int main(void) { G…
A: logic:- Set sum=0 iterate from i=0 to i<length of array sum=sum+arr[i] end loop display length…
Q: How can I fix this error in RStudio? > retr_month <- format(as.Date(time(retr)), "%m") Error in…
A: > retr_month <- format(as.Date(time(retr)), "%m") you can fix the above error as
Q: Which of the following code segments contains an error? a. int *number; printf("%d\n",…
A: A pointer is a variable which stores address of variable. & Is address operator. * Is…
Q: 13. What is Math.floor(3.6)? a. 3.0 b. 3 с. 4 d. 5.0 14. Which of the following assignment…
A: Math.floor(double a) :- it returns the largest double value that is less than or equal to the…
Q: Predict the output? #include using namespace std; class ClassA { public:…
A: Question 3. Predict the output? #include<iostream> using namespace std; class ClassA {…
Q: help me with this!! i need the output to be the same on what's on the photo here's my editable…
A:
Q: Which of the following is a copy constructor? public Student(int id, String name) {…}…
A: Lets see the solution.
Q: Which one is a valid variable declaration? a- int my_num = 100.0; b- int $my_num =…
A: int myNum = 1000; is a valid variable declaration beacuse you are assigning a integer (100) to a…
Q: Using Math.max and/or Math.min, write a class MaxOrMin, and make sure touse Math.max and Math.min…
A: Java codeimport java.util.Scanner; public class MaxOrMin {public static void main(String[]…
Q: Given that two int variables, total and amount, have been declared, write a sequence of statements…
A: 1. Initialize total to 0 2. Read 3 values into amount one at a time. 3. Add amount to total.
Q: java Which of the following examples is an example of implicit type conversion? int x = 5; int i =…
A: The answer is given below.
1.
int i1;
what is the value of int1?
a. |
0 |
|
b. |
null |
|
c. |
can not tell from the info given |
2.
Temporarily changing one data type to another is known as ________________.
a. |
typecasting |
|
b. |
intimidation |
|
c. |
constructing |
|
d. |
variable casting |
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- What is the output of the following code segment?intc=6,6=12;if(cd);Write(Green);WriteLine(Yellow); Green Yellow GreenYellow nothingWhat is the output of the following code segment?intc=6,d=12;if(cd)if(c8)Write(blue);elseWrite(Red);elseWrite(Green); Blue Red Green nothingCan you change a bit of the code to out put the monthly rent with two decimals. Thanks! #include <iostream>#include <iomanip>#include <string>using namespace std; class RealProperty{ private:// streetAddress that hold the street addressstring streetAddress;// squareFoot that hold the square footageint squareFoot;// taxes that hold the taxesdouble taxes; public:// default constructor of RealProperty class it's initlizes the fieldsRealProperty(){streetAddress = "";squareFoot = 0;taxes = 0.0;} // parameterized constructor of RealProperty classRealProperty(string sAddress, int sqFootage, double tax){streetAddress = sAddress;squareFoot = sqFootage;taxes = tax;} // setStreetAddress function for set the street addressvoid setStreetAddress(string sAddress){streetAddress = sAddress;} //setSquareFootage function for set the square footagevoid setSquareFootage(int sqFootage){if(sqFootage > 0){squareFoot = sqFootage;}elsecout << "Square footage must be a positive…
- Is there a reason why the system takes off the first letter of the name when it shows the user with the highest GPA? How can I fix it. The bug is in bold. Thank you! #include "stdafx.h"#include <iostream>#include <string> using namespace std; //declare Student Class class Student { //private member of class private: string Full_Name; float Student_GPA; int Student_Rank; //public class members public: //function to get student name void setStudentdata(string SN, float GPA, int rank) { Full_Name = SN;Student_GPA = GPA;Student_Rank = rank; } //return student name function void getStudentdata(string &SN, float &GPA, int &rank) { SN = Full_Name;GPA = Student_GPA;rank = Student_Rank;} }; int main() { Student info[3];//variable declaration string studentName; float studentGpa; int studentRank; //prompt user to enter name GPA and rank for (int i = 0; i < 3; i++) { cout << "\nEnter record for Student " << i + 1; cout << "\nName:…Each of the following files in the Chapter.04 folder of your downloadable student files has syntax and/or logical errors. In each case, determine the problem, and fix the program. After you correct the errors, save each file using the same filename preceded with Fixed. For example, save DebugFour1.cs as FixedDebugFour1.cs. a. DebugFour1.cs b. DebugFour2.cs c. DebugFour3.cs d. DebugFour4.cschar xusername[10]; char xbankname[10]; int xaccountnum[4]; int xcardnum[14]; int xpass[4]; int xwalletnum[11]; int xOTP[4]; printf("Enjoy a range of our banking services including cash withdrawals and deposits, card and loan installment payments, bill payments, smart wallet recharge, and card-less services.\n\n\n"); printf("If you are bank staff press 1. \t\t\t If you are a customer press 2.\n"); int num;label0: scanf_s("%d", &num); if (num == 1) {//bank staff char bank_staff[10] = { "mahmoud" }; char xbank_staff[10]; int bank_pass[4] = { 5,5,5,5 }; int xbank_pass[4]; int doha = 0; labelinf1: printf("Enter your name.\n"); scanf_s("%s", xbank_staff, 10); if (strcmp(xbank_staff, bank_staff) == 0) { printf("Enter your password.\n"); scan_array(xbank_pass, 4); for (int i = 0; i < 4; i++) { if (xbank_pass[i] == bank_pass[i]) {…
- 16) Assume you are working in a Python program and you have been given the following lines of Python code studentFirstName = “Sam” studentLastName = “Smith” studentFullName = concatNames(studentFirstName, studentLastName) Assume there is currently no method called concatNames in the file you are working on. In the space below, write the Python code to create a method called concatNames that will take in two values called fName and lName. The method should concatenate the names and return the full name of the student as one String called totalName.The following code does not work. What needs to be fixed? Retype the code and clearly label what needs to be done. You should only add one line of code. #include <iostream> #include <iomanip> #include <cmath> using namespace std; double collegeFund(double payment, double interest, double years); void calculateAndPrint(double payment, double interest, double years); int main() { double futureValue; double PMT; double i; double n = 18; double annualIncome; const double COLLEGE_TUITION = 10250 * 4; //Cost per year to attend Texas A&M University. Whoop! cout << fixed << showpoint << setprecision(2); cout << "Enter the amount you plan to invest each year: "; cin >> PMT; cout << endl; cout <<…Which of the following cannot be used as constructors ? a. T[] array = new T[10]; b. T[] arr = (T[]) new Object[5]; c. T reference = (T) new Object(); d. T reference = new T();
- How do I fix the error Java? Error ---------- Movie.toString() returns: Movie: [ Minutes 142 | Movie Name:The Shawshank Redemption | not kid friendly | Number of Cast Members: 3 | Cast Members: ] instead of: Movie: [ Minutes 142 | Movie Name: The Shawshank Redemption | not kid friendly | Number of Cast Members: 3 | Cast Members: Tim Robins, Morgan Freeman, Bob Guton ] without bringing this error Error ---------- Exception occurred while calling Movie.toString() Code: import java.util.*; import java.util.Arrays; public class Movie { private String movieName; private int numMinutes; private boolean isKidFriendly; private int numCastMembers; private String[] castMembers; // default constructor public Movie() { this.movieName = "Flick"; this.numMinutes = 0; this.isKidFriendly = false; this.numCastMembers = 0; this.castMembers = new String[10]; } // overloaded parameterized constructor public Movie(String movieName, int numMinutes, boolean isKidFriendly, String[] castMembers)…1.) Write constant declaration for the following: - A public variable that is used to measure tolerance, with the value 0.001 - A private variable that is used to indicate a pass mark, with the integer value of 40 - A public character variable that is used to indicate that the help command is "h" 2.) what constant names are defined in the java.lang.math class? 3.) in a program that uses the constant value 73.28166 in ten different place, give reasons why it makes sense to associate this value with a variable name.A .The following JavaScript command adds a method to a built-in class that can be called on any object instance of that class.Array.prototype.scramble = function() { this.sort(function() { return 0.5 – Math.random(); });} Select one: True False B. Suppose you have written a JavaScript for loop, and one of the statements that will execute with each iteration of the loop includes an anonymous function that uses the for loop’s counter variable, i. Which statement about this loop is true? a.The anonymous function will execute when it is called by the program, using the value ofiat the time it was encountered in the loop. b. The anonymous function will throw an error if it is called by the program after theforloop has finished iterating. c. The anonymous function will execute when it is called by the program, using the value ofiafter the final iteration of the loop. d.The forloop signals the JavaScript interpreter to copy the body of the anonymous function but not its…