What is output (printed) by the program (pseudocode) shown below. Assuming pass-by-value-result __________: int c; // global procedure TTT(int x) { x = x+2; c = c-1; } main() { c = 18; TTT(c); Print(c) }
Q: What will be output to the screen when the following code is executed: def PrintMe(x): try: return…
A: The problem is based on the basics of functions in python programming language.
Q: Consider the following code. Then choose the equivalent pseudocode? спр еах, var2 jbe L1 mov var3,10…
A: Hello student. Warm welcome from my side. Hope you are doing great. I will try my best to answer…
Q: Draw a memory diagram of the variables of the following code after the execution of the code. Please…
A: Memory diagram can be used to understand the values of variables after the execution of a program…
Q: The image below is the assignment, and above that is the code written to solve it... Please explain…
A: Given code: using System.IO;using System;class Program{ static void Main(){ double [] lst…
Q: Write a program OrderCheck.java that takes four int command-line arguments w, x, y, and z. Define a…
A: The code for the above program is given below:
Q: Program in C. Solve the problems below. #include int par_ou_impar(int n){ return n%2==0?1:0; }…
A: Program in C. Solve the problems below.
Q: tenuse (a, b) sqrt (a*a + b*
A: Solution - In the given question, we have to find the correct answer among the given options.
Q: 1. execute the program in the background 2. obtain process status 3. show to the zombie child…
A: The Program referenced in the question Lab7.c ,creates a Zombie process. The program creates a…
Q: 6. Write a program that reads in the radius and height of a cone and computes the volume using the…
A: According to bartleby guidelines we need to solve only first question please post remaining…
Q: diy.h x +C Custom Input Output main.c Test Cases 1. DIY Pattern(from codeChum, modified) 1 int…
A: getNum() Method: #include<stdio.h> int getNum() { int n1,n2,n3,n4; scanf("%d",&n1);…
Q: Watson likes to challenge Sherlock's math ability. He will provide a starting and ending value…
A: function squares(a, b) { let arr = [], limit1 = 0, limit2 = 0; limit1 =…
Q: For Javascript, the prompt asks the following: Write a function that uses alert() to display pairs…
A: Program Approach-1)Create a function named convertTemp () with two parameters lowTemp and…
Q: What is the output of the following code, show your work on white paper and attach it in the…
A: Code Numbered, N=7 S = "Wireline Drilling Testing Artificial Lift" Do Until ( N < 3 ) S =…
Q: 1.1.2: Output variable value. АCTIVITY 283902.1889792.qx3zay7 Jump to level 1 Write a statement that…
A: import java.util.Scanner;public class InputExample{ public static void main(String args[]) {…
Q: AI Hikma book shop provides a menu to customers with title and prices, and the user selects an item…
A: import java.util.Scanner;public class Main{ public static void main(String[] args) { Scanner sc…
Q: the next line, but such values don't actually appear as output when the program rur Enter integer: 4…
A: Solution: Given,
Q: In C-language expression, how is not equal to represented? Select one: a. = b. all of the choices C.…
A: Find the answer with reason given as below :
Q: What is the content of the variable myString after executing the following code successfully stri -…
A: Given strings: str1="This is my first program" str2="I am a programmer" str3="I am an engineer"…
Q: ify your program so every data entry statement uses a TryParse() method to ensure that each piece of…
A: It is defined as a powerful general-purpose programming language. It is used to develop desktop and…
Q: Finding Errors. Identifying the line/s containing errors that can cause the program not to run.…
A: Program Errors: Errors are obstacles that prevent a program to be successfully compiled and…
Q: int x-10; void func1() printf("x-*d\n", x); return; 10 } 11 12 13 int func2(int a, int b) 14 ( 15 16…
A: The code given: #include<stdio.h> int x = 10; void func1(){ printf("X=%d\n", x);…
Q: In right triangle ABC below, angle C is 90 degrees, side a = 48 , and side c = 73. Write a Java…
A: Program42.javaIn right triangle ABC below, angle C is 90 degrees, side a = 48 , and side c = 73.…
Q: You are playing a game that has two dice – one die has 6 sides numbered 1 through 6 and the second…
A: In the program below, I have generated random numbers to simulate the dices but you can modify the…
Q: C programming #include int main() { int i, j, n ; printf("height? ") ; scanf("%2d", &n) ; for (i =…
A: Answer: program 1:- #include <stdio.h> int main() { int i, j, n ; printf("height? ") ;…
Q: 50. Consider the following pseudocode fragment, where X is an integer variable that has been…
A: Lets Check Option1: (i==10) OR (i==X) it means that when Loop will Terminate the value of i equal…
Q: (In Java) Write single & multiline commens to to describe and label the following concepts in the…
A: Write single & multiline commens to to describe and label the following concepts in the program…
Q: Computer Science Your dev lead wants to plan a celebration for the 100th code war event that we…
A: Implement the code in the language of your choice and give the running time for several values of N…
Q: Ybat is the output of each of the following program segments? cout << hidden(15, 10) << endl; a. b.…
A: a. cout<<hidden(15,10)<<endl; In the above function call, the value 15 will copy into…
Q: uppose we are developing a program that a car dealership can use to manage its inventory of used…
A: Below is the required java program. Program Approach: Create a class as Automobile. Inside an…
Q: Consider the following program listing and assume it is run as a module 1 def main() -> None: х3D…
A: This question comes from Python Programming Language which is a paper of computer science. Let's…
Q: 1. Get the value of variable num assuming it is equal to 5. if (num >= 6) Cout num3) if (num1 >…
A: The given question requires us to provide the output generated by the given fragments of code and…
Q: int result= %3D%3B For (int i-o;ikait) int count = 7; Whire count >=0) resuit ttj Count--
A: According to the Question below the Solution:
Q: 3.27 LAB: Mах of 3 Write a program that takes in three integers and outputs the largest value. Ex:…
A: Given: To write code in C.
Q: The following code segment moves the robot around the grid. Assume that n is a positive integer.…
A: The Answer is
Q: Consider the following code. Then choose the equivalent pseudocode? cmp eax,var2 jbe L1 mov var3,10…
A: Solution:
Q: complete magic Square #include using namespace std; /*int f( int x, int y, int* p, int* q ) { if…
A: It is defined as a direct descendant of C programming language with additional features such as type…
Q: can you edit our c++ program wherein there will be a "thank you" message after exiting the program
A: Switch statement is used in the above code. There are 3 cases and case 3 is for exit. So we will do…
Q: Q2: Order of operations and math data types
A: Literals Constant values in Java are known as literals. Literals can be assigned to any variable…
Q: Create a program that does the following : a. Seeds the random number generator with time(0) b.…
A: The answer is given below:-
Q: Java code Ever wondered how change is disbursed to customers in certain stores? In country X the…
A:
Q: Finding Errors. Identifying the line/s containing errors that can cause the program not to run.…
A: The solution to the given problem is below.
Q: You are developing a restaurant recommender program. This is a snippet of your code. Pick all of the…
A: Given: You are Developing a restaurant recommender program. this is the snippet of your code . Pick…
Q: Find the 2 bugs in the following code: int main () float temps={75.6, 60.5, 92.3}; // loop through…
A: Note: We are authorized to answer one question at a time, since you have not mentioned which…
Q: Write a C# console application named DivisionApp that accepts two integers from the user. The first…
A: using System; class DivisionApp { static void Main(string[] args) { int divident,…
Q: Identify all private, shared variables in the following code snippet. What is the output of the…
A: From the given code, Total variables are - count, A, B, IS, index, i In this case variable A, B,…
Q: main.cpp:4:17: error: string' has not been declared 4 | void KMPSearch(string pat, string txt)…
A: Hi there, Please find your solution below, I hope you would find my solution useful and helpful.…
Q: Program in C. Solve the problems below. #include int par_ou_impar(int n){ return n%2==0?1:0; }…
A: Please find the answer below :
Q: (PYTHON) For Checkpoint B, you will extend your code from Checkpoint A by calculating the WCT for…
A: Objective: According to the given question, the input validation check for the number of locations…
Q: hello! can you please help me with my code? i need to get the same expected output. the instructions…
A: INTRODUCTION: Here we need to fill the function in c programming language.
What is output (printed) by the program (pseudocode) shown below. Assuming
pass-by-value-result __________:
int c; // global
procedure TTT(int x)
{ x = x+2;
c = c-1;
}
main()
{ c = 18;
TTT(c);
Print(c)
}
A)18
B)17
C)19
D)20
Step by step
Solved in 2 steps
- Write a program in C language that accepts integers as command-line arguments. The number of command-line arguments accepted must be even. Say you input 6 command line arguments, the first three must go into array1, and the next three have to go into array2.Next, calculate a1[1]^a2[1], a1[2]^a2[2], … a1[n]^a2[n] and display the results. Must be coded in CGiven the following code segment, what is output to the screen? char name1[20] = "Sean"; char name2[20] = "Pierce"; strcpy(name1,name2); cout << name1 << " " << name2; Group of answer choices Pierce Pierce Sean Sean Sean Pierce None of these ================== Given the following code segment, what is output to the screen? void assignments(int&, int); int main() { int output = 0, input = 5; assignments(output, input); cout << output << endl; } void assignments(int& myOutput, int myInput) { if (myInput < 0) myOutput = -2; else if (myInput == 0) myOutput = 0; else myOutput = myInput; } Group of answer choices 5 0 -2 None of these ============== A void function can be used in an assignment. Group of answer choices True False#include <iostream> #include <iomanip> using namespace std; int main(){cout<<" Welcome to Result Management System "<<endl<<endl; int mark[15];int i,j, temp , max , min, sum;float avr;for ( int i = 0 ; i<=14; i++){cout<<" Enter PDI Marks of Student "<<i<<": "; cin>>mark[i];cout<<endl;}for (i=0; i<=14; i++){for (j = i+1 ; j<= 14; j++){if( mark[i]< mark[j]) {temp = mark[i]; mark[i]= mark[j]; mark[j]= temp;} }}cout<<endl;for (int i= 0 ; i<=14; i++)cout<<setw(5)<<mark[i];cout<<endl<<endl;cout<<" All Students Marks in PDI (Highest to Lowest)"<<endl<<endl; max = mark[0];min= mark[0];for( i=0 ; i<=14; i++){if ( mark[i]> max) max = mark[i];if ( mark[i] <min) min = mark[i];}cout<<" Lowest Marks: "<<min<<endl<<endl;cout<<" Highest Marks: "<<max<<endl<<endl; {for ( i=0 ; i<=14; i++)sum+= mark[i];}avr=…
- Image shows the question, below is an example output: Latitude: 23 [FAILED] Calculated CRC: 3 Expected CRC: 6 1011100010110000--------00001000 0000100000001011--------00000011 Longitude: 80 [FAILED] Calculated CRC: 5 Expected CRC: 4 10100000001011000000----------0001000000 00010000000001011000----------0000011000 00000110000000010110----------0000001110 00000011100000001011----------0000000101 Elevation: 13548 [OK] 1101001110110000010110000000000000-----------------01100011101100000 0110001110110000001011000000000000-----------------00111011101100000 0011101110110000000101100000000000-----------------00010111101100000 0001011110110000000010110000000000-----------------00000001101100000 0000000110110000000000001011000000-----------------00000000110100000 0000000011010000000000000101100000-----------------00000000011000000 0000000001100000000000000010110000-----------------00000000001110000 0000000000111000000000000001011000-----------------00000000000101000…please 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 mainConsider the following obfuscated and confusing program code below. #include <iostream> using namespace std; int fib(int); int main() { cout << "Enter an index for the Fibonacci number: "; int index; cin >> index; cout << "Fibonacci number at index " << index << " is " << fib(index) << endl; return 0; } int fib(int index) { if (index == 0) return 0; else if (index == 1) return 1; else return fib(index - 1) + fib(index - 2); } Create a C++ Builder Console Project and copy/paste the above code into the .cpp file of the project. Run the project... it should run fine. Now, REFORMAT the code to demonstrate you know Software Engineering principles in making code readable and understandable. FOLLOW the exmples that are given in the textbook and the learning activities. ADD COMMENTS to document what the program/code does. You will be expected to format your code throughout this course using proper indentations and placement of curly braces. STUDY…
- Within the tutorial casino craps game pseudocode, where should you place the pseudocode that performs the task of 'Get if the player won or lost', and how (in pseudocode) should this task be implemented? a.) In Function play, with pseudocode function play() ... set a local variable to won or lost b.) In Function play, with pseudocode function play() ... return if the player won or lost c.) In Loop until Games Played = Times to Play, with pseudocode Loop until Games Played = Times to Play ... If the player won ... Set "Get if the player won or lost" to won Else if player lost ... Set "Get if the player won or lost" to lost d.) In Loop until Games Played = Times to Play, with pseudocode Loop until Games Played = Times to Play ... If the player won ... Else if player lost ... Set "Get if the player won or lost" to won or lostIdentify all private, shared variables in the following code snippet. What is the output of the program (e.g. the value of IS)? int A[100]; int count; void work(int index[]) { float B[10]; …… } void main(){ int IS = 10; int i=0; #pragma omp parallel private(i) { int index[10]; work(index); #pragma omp for reduction(+:IS) for(i=0;i<100;i++) { IS = IS + i; } } printf(“%i\n”, IS); }Create a Student class in C++ language to read and print N student's details. The output shall be like the following: Enter name: Ahmad Enter ID number: 101 Enter total marks out of 500: 456 Enter details of student 2: Enter name: Ali Enter ID number: 102 Enter total marks outof 500: 398 ...... until student number 10 Details of student 1: Student details: Name:Ahmed,Roll Number:101,Total:456,Percentage:91.2 Details of student 2: Student details: Name:Ali,Roll Number:102,Total:398,Percentage:79.6 ....... until student number 10 Enter total number of students: 10 Enter details of student 1:
- 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 formatlastnamePrelimLabExamI ONLY NEED THE ALGORITHM IN STEPS FOR THIS CODE main.c #include "driverlib.h" #include "delay.h" #include "DHT11.h" #include "lcd.h" #include "lcd_print.h" extern unsigned char values[0x05]; void clock_init(void); void main(void) { unsigned char state = 0; WDT_A_hold(WDT_A_BASE); clock_init(); LCD_init(); load_custom_symbol(); DHT11_init(); while(1) { state = get_data(); switch(state) { case 1: { } case 2: { LCD_clear_home(); LCD_putstr("No Sensor Found!"); break; } case 3: { LCD_clear_home(); LCD_putstr("Checksum Error!"); break; } default: { LCD_goto(0, 0); LCD_putstr("R.H/ %: "); print_C(13, 0, values[0]); LCD_goto(0,…Consider the following data type definitions struct A{ char c; int i;}; union U{ struct A a1; struct A a2;}; And the following statements. You can assume that rest of the code is valid. union U u1;u1.a1.c = 'A';u1.a2.c = 'B'; u1.a2.i = 50; What would happen if you do a printf("%c", u1.a1.c); ? Choose ONLY the correct answers (one or more). Question 9 options: It will print B The behaviour is undefined, it might print either A or B It will print A It will print the character whose ASCII equivalent is 50 It will print AB