What is output (printed) by the program (pseudocode) shown below. Assuming pass-by-reference __________: int c; // global procedure TTT(int x) { x = x+2; c = c-1; } main() { c = 18; TTT(c); Print(c) } A)20 B)18 C)17 D)19
Q: Hello, welcome to the Code Blasters code-writing competition! So, let's start with the exercise…
A: Input-Output Explanation: The first line of the input contains a single integer TT .TT denoting the…
Q: Write a C++ program in which the user can enter a number of rows to print the half star pyramid…
A: In this program, you need to take user input for number of rows. Then you need to print desired…
Q: Draw a bar chart of 5 values entered by the user (>=0), where the y-axis is along the rows and the…
A: PROGRAM CODE:…
Q: 3. Write a complete C++ program that will keep receiving input (integer) from user until the user…
A: Below is the required C++ code. Approach of a program: Include necessary header files and use a…
Q: A C program contains the following declarations and initial assignments: int i= 8, j = 5; float x =…
A: Given: A C program contains the following declarations and initial assignments:int i= 8, j = 5;float…
Q: Run the following C++ program. Assume that user enters these numbers (8,101,46,57). What is the…
A: The program prints the value of “counter” which is 332 as its output. Explanation: Input: 8 The…
Q: Srikanth is a school student. He studies in class 8th. One day his Math’s teacher came to the class…
A: Please find the answer below :
Q: Consider the following code segment if (n != 0 && x / n > 100) statement1; else statement2; If n is…
A: The if/else statement executes a block of code if a specified condition is true. If the condition is…
Q: Process conpleted GRADED ACTIVITY #3 (M6.1): SEQUENCE PROBLEM Instruction: Using the sequence…
A: Step 1 Algorithm: 1 Start 2 Read 4 resistors r1,r2,r3,r4 3 Calculate sr=r1+r2+r3+r4 4 Calculate…
Q: Write a C++ program that displays a table of conversions from feet to meters. The program needs to…
A: C++ program that displays a table of conversions from feet to meters. Algorithm: Start prompt…
Q: Develop a c# program A palindrome is a sequence of characters that reads the same backward as…
A: using System; public class ThreeDigitPalindromeCheck { public static bool…
Q: Draw a bar chart of 5 values entered by the user (>=0), where the y-axis is along the rows and the…
A: Given data is shown below: Draw a bar chart of 5 values entered by the user (>=0), where the…
Q: Explain all the elements of the below c program.
A: Program in C with explanation: #include <stdio.h> // It is header function that store related…
Q: he Billy Goat Fast-Fast Food restaurant sells the following products: Product Price ($)…
A: items = ['Cheeseburger','Pepsi','Chips']price = [2.49,1.00,0.59]print('Items\t\t\tPrice($)')for i in…
Q: Write a C++ program that perform following two tasks: 1. Conduct a quiz that contains 4 questions.…
A: C++ CODE TO COPY:- #include <iostream> using namespace std; class Question{ public: string q;…
Q: Create a simple C++ program using struct named Rectangle, which has two data members width and…
A: Input : Define structure in C++. Input width and length of the rectangle Output : Output area of…
Q: Write a program in C++ that lets the user input an odd number of positive integers ( each separated…
A: Sample Output
Q: Write a C++ program that will display a menu consisting of 3 brands of soda, 3 kinds of sandwiches,…
A:
Q: Write a C++ program to add, subtract, mulitply and divide two fractions and display the result…
A: Note: The program result is in the fractional form not in the reduced/simplified form. If required…
Q: Consider the following code segment. It is designed to convert letter grades to grade points.…
A: There is Nothing Wrong with this code segment. Option 2,3 ,4 are False.
Q: In C++, if the statement (int a=5, b=2:) is written at the beginning of the program, then the output…
A: a) option cif the statement is given as int a=5,b=2; here two variables a and b are initialized with…
Q: In this assignment you will write a computer program from scratch using the Python programming…
A: Code: def add(a,b): return a+b def subtract(a,b): return a-b def multiply (a,b): return a*b def…
Q: An electrical manufacturertest five generators by measuringtheir output voltages at three at three…
A: logic:- define a 2d array of size 15 ie 5 by 3 array. use nested loop to read all the values.…
Q: You are required to write a serial program that performs multiplication for two n-digits decimal…
A: C++ C++ is a general-purpose, object-oriented, middle-level programming language that is an…
Q: int sizeQfShaps (>= 2 and = 1 and =1 and < = 25) Test 2 For sizeofShape = 7, xCentre = 76, yCentre =…
A: java code for the above output
Q: Run the following C++ program. Assume that user enters these numbers (8,101,46,57). What is the…
A: The value of the variable “counter” is according to given numbers at the end of the program will be…
Q: You need to develop a special calculator with the following features: a. Add 2 number. b. Divide 2…
A: Coded using C language.
Q: A C program contains the following declarations and initial assignments: int i= 8, j = 5; float…
A: ASCII value of c=99 ASCII value of d=100
Q: C++ Create a program that reads a simple arithmetic expression and evaluates it. More precisely,…
A: Answer is given below:
Q: The code below is written in C. In C, for each integer variable 4 Byte, for each char variable 1…
A: The code below is written in C. In C, for each integer variable 4 Byte, for each char variable 1…
Q: Write a C++ program that will display a menu consisting of 3 brands of soda, 3 kinds of sandwiches,…
A: Note: The product name, price and their code are not describe in the question so they are taken…
Q: Write a program to model a simple calculator. Each data line should consist of the next operation to…
A: Here, we have to implement a calculator that works on following valid operators:- + add- subtract*…
Q: please help me make a program using C Programming only about this problem plssS. PLEASE KINDLY…
A: As per the given question, we need to write a C program that computes : Sum of all numbers divisible…
Q: Play Yahtzee specs For this game, you will need no user input at all. Declare integer variables that…
A: how to find random number between 1-6. rand() returns a random number in range of 0 to a constant…
Q: game #4 player 1 : rock player 2 : rock playerl = 1, player2 = 1 Notice this game scores didn't cha…
A: #include<iostream> #include<cstdlib> #include<ctime> int main(){ unsigned…
Q: Write a c++program that asks the user to enter a part number to order. The rules for creating a part…
A: Program Plan: Create a C ++ file called with word PartNumber.cpp Write header files at the header…
Q: For the following program: Please create a program in C++ that allows you to view and edit the sales…
A: Here, I have to write a C++ program to the above question.
Q: This is a C program. I want you to convert it to a C++. Also provide a screenshot that it is working…
A: Few thing has to be changed while changing c into c++. Here is the converted code:
Q: Write the value of each of the following expressions, using the following data declarations: double…
A: 1) (17.5 >12.0) &&(9/2<=4) property of &&(AND LOGICAL OPERATOR) is (true,…
Q: Question #1: Write a C program that implements the following pseudocode: 1. Input an integer…
A: if-else is a control flow statement that tests a condition or expression of if statement. The "if"…
Q: Write a C++ program that will display a menu consisting of 3 brands of soda, 3 kinds of sandwiches,…
A: 1)Start 2)Display the menu 3)Ask user for input 4)Based on the input calculate total bill and…
Q: Write a C++ program that will display a menu consisting of 3 brands of soda, 3 kinds of sandwiches,…
A: Here is the approach :- Create three array one to store the names, Second to store the code ,…
Q: Please modify the C++ data structure program below to detect and display multiple candidates with…
A: Please modify the C++ data structure program below to detect and display multiple candidates with…
Q: Based on the image attached, draw the flowchart
A: I have drawn the flowchart of the given problem. The flowchart is big hence the next part is…
Q: Below are all questions to be answered in XCode Swift language. 10. Is the following code segment…
A: Given the code segment the correct answer with reason is given below.
Q: Develop a program that allows the user to enter a start value of 1 to 4, a stop value of 5 to 12 and…
A: Hello student Greetings Hope you are doing great. As you have not mentioned any particular language…
Q: #include "driverlib.h" #include "delay.h" #include "DHT11.h" #include "lcd.h" #include…
A: In this question we have some given lines of code. We have to write algorithm for that. The required…
Q: Run the following C++ program. Assume that user enters these numbers (8,101,46,57). What is the…
A: PROGRAM: //Header file #include <iostream> //Using namespace using namespace std; //control()…
Q: A valid email address consists of an email prefix and an email domain, both in acceptable formats.…
A: bool checkValid function requirements:- // finding position of '@' // if '@' is not found return…
What is output (printed) by the program (pseudocode) shown below. Assuming
pass-by-reference __________:
int c; // global
procedure TTT(int x)
{ x = x+2;
c = c-1;
}
main()
{ c = 18;
TTT(c);
Print(c)
}
A)20
B)18
C)17
D)19
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- C programming: Stacks. Help fully understand the code below by putting comments. THanks! ... #include<stdio.h> #include<stdlib.h> #include<ctype.h> #include<string.h> int numbers[500], tn=-1, to=-1; char ops[500]; void pushNum(int n) { numbers[++tn] = n; } void pushOp(char ch) { ops[++to]=ch; } int popNum() { return numbers[tn--]; } char popOp() { return ops[to--]; } int precedence(char op){ if(op == '+'||op == '-') return 1; if(op == '*'||op == '/') return 2; return 0; } // this function will perform arithmetic operations. int applyOp(int a, int b, char op){ switch(op){ case '+': return a + b; case '-': return a - b; case '*': return a * b; case '/': return a / b; default: return 0; } } int isOperator(char ch) { return(ch=='+'||ch=='-'||ch=='*'||ch=='/'||ch=='^'); } int evaluate(char exp[200]){ int i,num,output,r; char c; for(i=0;exp[i]!='\0';i++) { c = exp[i];…Java Program create a prog that will compute the final grade for a certain student and will display the final grade and a remark if it is passed or failedPass = 75 aboveFailed = 74 belowCS= 60% quiz + 40 assignmentPG =[ 2(Pcs) + PE] / 3TMG = [2(Mcs) +ME] /3MG = [2(TMG) + PG] / 3TFG = [Fcs +ME + SFE] /3FG = [2(TFG) + MG ] / 3sample output:enter name of student: Cruzenter quiz Score: 75enter assignment Score: 75enter PE Score: 75PG of Cruz is : 75enter Mquiz Score: 75enter Massignment Score: 75enter ME Score: 75MG of Cruz is: 75enter Fquiz Score: 75enter Fassignment Score: 75enter SFE Score: 75enter FE Score: 75FG of Cruz is : 75congrats you PASSHAVE A SCREENSHOT OF YOUR ENTIRE OUTPUT PROG PUT IT IN DOCS FORM TOGETHER WITH YOUR CODE which should be in .txt formatlastnamePrelimLabExamIn this c++ program edit this code and please input the following details Following details Name of candidate of presidency: Name of province in Laguna: Name: Address: Vote of registered voters in Laguna And remove the winner and percentage. Source Code: #include <bits/stdc++.h>using namespace std; class candidate{ public: string name; int vote;}; void outputElection(candidate* arr){ int total_vote=0; for(int i=0;i<5;i++){ //finding total no of votes total_vote=total_vote+arr[i].vote; } cout<<"result of the election............."<<endl; cout<<"name of candidate"<<"\t"<<"vote received"<<"\t"<<"percentage"<<endl; for(int i=0;i<5;i++){ cout<<arr[i].name<<"\t\t\t"; cout<<arr[i].vote<<"\t\t"; cout<<(arr[i].vote*100)/total_vote<<"%"<<endl; } int max=INT_MIN,count=0; int index[5]={0}; for(int…
- Consider the following statement#define hypotenuse (a, b) sqrt (a*a + b*b);The macro-call hypotenuse (a + 2, b + 3); A. finds hypotenuse of triangle with sides a + 2 and b+3 B. finds square root of (a + 2)2 + (b + 3)2 C. is meaningless D. finds square root of 3*a + 4*b + 5# Write python codes here.print("Total E-Customer:", ECustomer.count)c1 = ECustomer("James")c1.setProductDetails("TV",35000,"Air Cooler", 9000)c2 = ECustomer("Mike")c2.setProductDetails("Mobile",20000,"Headphone",1200,"Fridge", 45000)c3 = ECustomer("Sarah")c3.setProductDetails("Headphone", 1200)print("=========================")c1.printDetail()print("=========================")c2.printDetail()print("=========================")c3.printDetail()print("=========================")print("Total E-Customer:", ECustomer.count)Output:Total E-Customer: 0=========================Name: JamesProducts: TV, Air CoolerTotal cost: 44000=========================Name: MikeProducts: Mobile, Headphone, FridgeTotal cost: 66200=========================Name: SarahProducts: HeadphoneTotal cost: 1200=========================Total E-Customer: 3please modify the c language program into a pep 9 assembly language #include <stdio.h> int num, answer; int divide ( int numer, int denom ) { int quotient, remain; remain = numer; quotient = 0; while ( remain >= denom ) { remain -= denom; quotient++; } // end for return quotient; } // end of divide( ) int modulus ( int n, int d ) { int quot, rem; rem = n; quot = 0; while ( rem >= d ) { rem -= d; quot++; } // end for return rem; } // end of modulus( ) int main() { printf("? "); scanf("%d", &num); answer = divide(num, 20); printf("%d / 20 = %d\n", num, answer); answer = modulus(num, 20); printf("%d mod 20 = %d\n", num, answer); answer = divide(num, 35); printf("%d / 35 = %d\n", num, answer); answer = modulus(num, 35); printf("%d mod 35 = %d\n", num, answer); return 0; } // end of main
- In this c# program please fix the height and inches, for example "Enter your Height in feet followed by a space then additional inches: 5 4" Source Code: using System;namespace BMI{ internal class Program { static void Main(string[] args) { float bmi, m, h; String name; Console.Write("Enter the student name: "); name = Console.ReadLine(); Console.Write("\nEnter the grade level(1-6): "); h = float.Parse(Console.ReadLine()); Console.Write("\nEnter the student Weight(kg): "); m = float.Parse(Console.ReadLine()); bmi = m / (h * h); Console.WriteLine("\nStudent BMI is: " + bmi); if(bmi < 18.5) { Console.WriteLine("\nStudent is Underweight"); } else if(bmi >= 18.5 && bmi < 25) { Console.WriteLine("\nStudent is Normal Weight"); } else…Consider the following C++ structure and declarations: struct Player { string firstName; string lastName; int hits; int runs; }; int main() { Player p = { "Jackie", "Robinson", 1518, 947 }; Player team[24]; Player *tPtr = team; team[0] = p; // INSERT CODE HERE } The statement tPtr = team+9; will assign the same memory address to tPtr as the statement tPtr = &(team[9]); A) True B) Falsestruct Info { int id; float cost; }; Given the struct above, the following code segment will correctly declare and initialize an instance of that struct. Info myInfo = {10,4.99}; Group of answer choices True False ============== Consider the following code fragment. int a[] = {3, -5, 7, 12, 9}; int *ptr = a; *ptr = (*ptr) + 1; cout << *ptr; Group of answer choices 4 -5 3 Address of -5 =============== What will happen if I use new without delete? Group of answer choices The program will never compile The program will never run The program will run fine without memory leak None of these
- Computer Science Your dev lead wants to plan a celebration for the 100th code war event that we have as a team. Since we only do code wars on the 5th Friday of the month what date will the 100th event fall on? Include 4/29/22 as the first event day. USE C# implement this code for the solution: using System; using System.Diagnostics; namespace September { /// <summary> /// April Code War /// </summary> class Program { /// <summary> /// Main method /// </summary> static void Main() { // Accuracy Test Console.WriteLine(Calculate100thFifthFriday()); Console.WriteLine(Calculate100thFebruaryFifthFriday()); Console.Out.WriteLine(); Console.Out.WriteLine(); // Speed Test Console.Out.WriteLine("Hit enter to start speed test");…Program in C. Solve the problems below. #include <stdio.h>int par_ou_impar(int n){return n%2==0?1:0;}int main() {int n;scanf("%d",&n);if(par_ou_impar(n)==0) printf("impar");else printf("par");return 0;} __tester__.c:23:5: error: redefinition of ‘main’ int main() { ^~~~ __tester__.c:13:5: note: previous definition of ‘main’ was here int main() { ^~~~Below are all questions to be answered in XCode Swift language. 10. Is the following code segment valid although the identifier "three" is not typed? let three = 3 var college = [Int]() college = [1,2,three] If yes, explain how. If not, suggest how to fix.