Task4. ASCII code is a seven-bit code in which the decimal digits are represented by the BCD code preceded by 011. • Since it is a 7-bit code, it represents 2^7 =128 symbols. • The letter of the alphabet and other symbols and instructions are represented by other code combination as shown in Table 1.9.6. For example, ASCII code for N = (4 E) H (1001110) binary. A quick exercise for you here, Write the ASCII code for 'ELECTRONICS'.
Q: Create a function that tweaks letters by one forward (+1) or backwards (-1) according to an array.…
A: Algorithm - Take input from user. Now use the below logic - for (int i = 0; i < s.size(); i++)…
Q: Write a C++ program to perform addition of two hexadecimal numerals each with up to 4 hex digits. If…
A: C++ program for above : #include <bits/stdc++.h> using namespace std; //function to…
Q: A 20 matrix can be represented as a list and a column count value in Python. For example, the 3x3…
A: def submatrix(x,y): # a means tuple containing matrix and no of columns and b means tuple containing…
Q: 6. Given the binary search function and an integer array a below with the target t-65, list all…
A: According to the information given:- We have binary search function and integer array and our…
Q: 30 31 32 //======= // Main Function 33 int main(void) { 34 //======= 35 36 37 38 39 40 41 42 43 44…
A: Set of items, each with a mass and a value, determine the number of each item to include in a…
Q: A common memory matching game played by young children is to start with a deck of cards that contain…
A: Program: //using header file #include <iostream> #include <time.h> #include…
Q: Write a program which computes the dot product of two 8-dimensional vectors, V1 and V2, and stores…
A: // C++ implementation for dot product#include <bits/stdc++.h>#define n 3 using namespace std;…
Q: 3, Consider the code #define row 3 #define col 4 main) int z[row][col] {1,2,3,4,5,6,7,8,9,10,11,12};…
A:
Q: If S is an array of 80 characters, then the value assigned to S through the statement scanf("%s",S)…
A: answer is
Q: Given that X is a double number array starting at location 100, ptr is a pointer to X, and each…
A: Given that X is a double number array starting at location 100, ptr is a pointer to X, and each…
Q: Rajesh loves lucky numbers. Everyone knows that lucky numbers are positive integers whose decimal…
A: Input/Output Parameter: The first line contains a single positive integer T, the number of test…
Q: Create a function that tweaks letters by one forward (+1) or backwards (-1) according to an array.…
A: As the programming language is not mentioned here, we are using PYTHON The Python code is given…
Q: Create a function that tweaks letters by one forward (+1) or backwards (-1) according to an array.…
A: In this problem, we need to design the code in the C++programming language. Input - two arguments…
Q: 6, 20, 24, 28, 32, 36, 40, 44, 48} and int B[4][3] = {5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35,…
A: We can have the general formula as, C[m][n]=A[m][n]+2*B[m][n] [from given int C[4][3] = A[4][3] +…
Q: The Subject is Data Structure Code using NetBeans. Q. Write a Java code to insert {23, 12, 18, 19,…
A: Given data is shown below: Q. Write a Java code to insert {23, 12, 18, 19, 20, 31, 6} in a AVL.
Q: Write a C++ program to update every array element by multiplication of next and previous values of a…
A: Code: #include<iostream>using namespace std; void replace_elements(int nums[], int n){ if…
Q: 8) Write a Java code segment to sum (total) only the positive (greater than zero) values contained…
A: The program makes use of the Random class to generate positive and negative integers. An int[] to…
Q: A university uses student numbers consisting of 6 digits plus a check digit in the 7th position. The…
A: As per the above listed problem statement we are assigned a task to find to find out which…
Q: C++ Implement Exercise 8-13 (8-13: Write a program to calculate students’ average test scores and…
A: #include <iostream> #include<fstream> #include<iomanip> using namespace std; class…
Q: 6 Suppose multidimensional arrays A and B are declared using A(-2:2, 2:22) and B(1:8,-5:5,-10:5) a.…
A:
Q: Consider the following array [3,4,6,3,7,12,3]. We see that 3 appears in indexes 0, 3, 6. Write a…
A: import java.util.Scanner;//to read inputpublic class Main{ public static void main(String[] args) {…
Q: double [] myArray {10, -9, 8, 1000, 0, 6, 13}; {59, 85, 82, 78, 70, 75, 72, 0}; {1.5, 3.3, 2.7, 3.7,…
A: This is java code. We will put the above code into a proper java program. Then we will get the…
Q: Create a function that tweaks letters by one forward (+1) or backwards (-1) according to an array.…
A: Since the programming language is not mentioned, I have provided the code in JavaScript Language.
Q: 1) You need to use JavaScript to modify a repeated element of unknown count on the page that is…
A: Introduction:- Javascript is a programming language that is used to design the website.…
Q: Ex(5): Write a computer program using FORTRAN 90 to read (m) marks of (n) students using a…
A: program test real, dimension(m,n) :: matrix real :: average integer :: num m = 5n = 3 do i = 1, n…
Q: Consider that the program uses student ID for interface i.e., input and output purposes but use a…
A: #include <stdio.h>#include <stdint.h>int getStdCode(int stdID){ // move 13 bit to 18…
Q: Write a script in Python to play two-dimensional Tic-Tac-Toe between two human players who alternate…
A: import random print('Welcome to Tic Tac Toe!') def display_board(board): print('\n'*100) #…
Q: 3. Consider the following C code fragment, which makes use of the strcpy version that truncates a…
A: Memory corruption can be described as the vulnerability that occurs when memory is replaced without…
Q: Q2. Write a C++ program that define an empty array of size 10 and user has to input marks scored by…
A: As per our guidelines we are supposed to answer only one question. Kindly repost the remaining…
Q: 113 1. Let A 2046 1137 a) What size is A? b) What is the third column of A? e) What is the second…
A: All the elements can be inserted as a vector Vector indexing starts from 1
Q: Create a function that tweaks letters by one forward (+1) or backwards (-1) according to an array.…
A: 1) Below is C++ Program that creates a function that tweaks letters by one forward or backwards…
Q: Write an assembly language code to store your middle
A: assembly language code to store your middle name alphabets in an Array and print it in Descending…
Q: Write a Assembly language program that copies the BYTES from array V1 to array V2 using indexed…
A: The WREG Register- The WREG (Working Register) Register is one of the most widely used registers of…
Q: Rajesh loves lucky numbers. Everyone knows that lucky numbers are positive integers whose decimal…
A: Input/Output Parameter: The first line contains a single positive integer T, the number of test…
Q: Write a C program that receives a character array of size 100 from and user and performs the…
A: The code is written below: #include <stdio.h> #include<string.h>…
Q: Using C++, Write a program to produce the first 100 Fibonacci numbers. A Fibonacci number is one…
A: Code to copy: #include <iostream>using namespace std;void print_Fibonacci_Numbers(int n){ int…
Q: Write a 8085 program to find the only number which appears only one time in an array and store it to…
A: Soution:-- Writing an 8085 program to find the only number which is present in an array will be…
Q: Exercise 1.7 Patterns, like the ones below, are available in most drawing programs for filling…
A: 4-bit Binary Number can be expressed as Hex as follows: 0000-0, 0001-1, 0010-2, 0011-3 0100-4,…
Q: Compute and print the first 10 Triangular numbers # # 1, 3, 6, 10, 15, 21, 28, 36, 45, 55 # # Row #…
A: .data newline: .asciiz "\n" .text li $t0,1 #counter for 10 triangular number li $t1,1 #initialised…
Q: 5. Please write C code of the matrix chain multiplication (A1.A2.A3) by using dynamic programming as…
A: NOTE- As per the guidelines I am solving the Matrix Multiplication using Dynamic Programming:-…
Q: Write a C++ program to perform following tasks: Declare a dynamic array of size 's'. Take input in s…
A: As per our policy , I am answering a, b and c. A. Dynamic Array:- Dynamic Array is the array whose…
Q: Rajesh loves lucky numbers. Everyone knows that lucky numbers are positive integers whose decimal…
A: The program is written in Python. Check the program screenshot for the correct indentation. Please…
Q: Given a triplet of integers (X , Y , Z), such that X ≤ Y and Y ≥ Z, we define f(X , Y , Z) to be (X…
A: Required: Given a triplet of integers (X , Y , Z), such that X ≤ Y and Y ≥ Z, we define f(X , Y , Z)…
Q: Write a code in C++ and create a two dimensional Array of size 5 X 5. (1) Inserting the following…
A: 1. Create a dynamic 2D array with size 5x5. 2. Store the numbers to be inserted into the 1D array.…
Q: 1. Write a C++ program that inputs an integer array of 10 elements and prints only the prime numbers…
A: Question 1: To write C++ program that inputs an integer array of 10 elements and prints only the…
Q: 14) Given the vector x [1 8 3 9 0 1], create a short set of commands that will: (using loop…
A: Introduction ----------------------- 1)Initialize y=0 to store sum of values of the vector 2)Using…
Q: code in python And Vs Xor Shobhit is trying to impress Kriti. Kriti is stuck in a problem and…
A: Coded using Python 3.
Q: Write a 8085 program to find the only number which appears only one time in an array and store it to…
A: Algorithm: Use XOR. XOR of all the elements will give the number that appears once. This is because…
Q: (1) Implement the function by allocating a new n X n 2D array. Then write the rotation to it by…
A: We need to write Java program to rotate the matrix with and without using new matrix.
Asap please it should be correct , i will downvote right away
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
- Computer Science Is it possible to convert this to java? #include <stdio.h> void printBinary(int n, int i) { // Prints the binary representation // of a number n up to i-bits. int k; for (k = i - 1; k >= 0; k--) { if ((n >> k) & 1) printf("1"); else printf("0"); } } typedef union { float f; struct { // Order is important. // Here the members of the union data structure // use the same memory (32 bits). // The ordering is taken // from the LSB to the MSB. unsigned int mantissa : 23; unsigned int exponent : 8; unsigned int sign : 1; } raw; } myfloat; // Function to convert real value // to IEEE floating point representation void printIEEE(myfloat var) { // Prints the IEEE 754 representation // of a float value (32 bits) printf("%d | ", var.raw.sign);…8) Write a Java code segment to sum (total) only the positive (greater than zero) values contained in a one dimensional array of integers named intArr that has already been filled with a variety of values (from -250 to +250, for example) and print the final total of the positive contents with an appropriate message.13. Implement function triangleArea(a,b,c) that takes as input the lengths of the 3 sides of a triangle and returns the area of the triangle. By Heron's formula, the area of atriangle with side lengths a, b, and c is √ s ( s−a )( s−b)( s−c ) , where s=(a+b+ c )/ 2 .>>> triangleArea(2,2,2)1.7320508075688772
- Not pseudocode Suppose the economies of the world use a set of currencies C1, . . . , Cn; think of these as dollars, pounds, Bitcoin, etc. Your bank allows you to trade each currency Ci for any other currency Cj, and finds some way to charge you for this service. Suppose that for each ordered pair of currencies (Ci, Cj ), the bank charges a flat fee of fij > 0 dollars to exchange Ci for Cj (regardless of the quantity of currency being exchanged). Describe an algorithm which, given a starting currency Cs, a target currency Ct, and a list of fees fij for all i, j ∈ {1, . . . , n}, computes the cheapest way (that is, incurring the least in fees) to exchange all of our currency in Cs into currency Ct. Also, justify the its runtime. [We are expecting a description of the algorithm, as well as a brief justification of its runtime.]bubblesort.h is in second picture This is bublesort.c int compare(Entry a, Entry b) {// IMPLEMENT}/*TEST: ./mergesort < test.inOUTPUT:1 lsdfjl2 ghijk3 ksdljf5 abc6 def*/int main(void) {// IMPLEMENT} this is test.in 55 abc6 def2 ghijk3 ksdljf1 lsdfjla. Translate with a three-address statement, the following expression: n = f((x+2), y) – 5; b. If A is an array of integers with width = 4; Translate with three-address statement, the following expression: x = a[i] + 2;
- Write a procedure for encryption by rotating each plaintext byte different number of positions. For example, in the following array that represents the encryption key, each number indicates a left rotation: key BYTE 6, 4, 1, 2, 7, 5, 2, 4, 3, 6. Pass the pointer to the text string in EDX, the array size to ECX, a pointer to the key array in ESI, and the direction value (0 or 1) in EBX. Assume that the key array size is 10. Your procedure should loop through plain text and align the key to the first 10 bytes of the message. Rotate each plain text to the left (if the value in EBX is 0) or to the right (if the value in EBX is 1) by the amount in the key array: first byte by 6, second byte by 4 etc. Then align the key to the next 10 bytes until the whole message is encrypted. Write a program that tests the procedure by calling : one time with EBX = 0 (encrypting), then with EBX = 1 (decrypting). Print out the text three times: the original, then the encrypted, then the decrypted.Computer Science you are given a string X of length n and another string Y of length m ≤n. Say,the indexes p1, p2, p3, p4 and q1, q2, q3, q4 form two sub-sequences, i.e., 0 ≤ p1 < p2 < p3 < p4 < nand 0 ≤q1 < q2 < q3 < q4 < n; then, they are non-overlapping if p4 < q1.The task is to count the maximum number of non-overlapping sub-sequences of X that are thesame as Y . Thus, if X = GAXTYAWBGTAUGBTABGRGTAXB and Y = GTAB, then the answer is3 as shown by the red fonts. We cannot select the underlined GTAB as it overlaps with a red GTAB(i.e., among overlapping sub-sequences, you can select only one of them).Describe an O(m + n) time algorithm to obtain the count. Write a pseudo-code.2022-02-14 20:52:35 Write the primitive counting results for your 40 sheep: 40= For example, the answer for "14" would be (1,1,1,0), meaning that the first division of sheep had none left over, but every other division of sheep had a leftover sheep. Include the commas and the parentheses in your answer.
- Compose a Python program to square and 3D shape each number in a given rundown of numbers utilizing Lambda.Unique rundown of whole numbers:[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]Square every number of the said list:[1, 4, 9, 16, 25, 36, 49, 64, 81, 100]3D square every number of the said list:[1, 8, 27, 64, 125, 216, 343, 512, 729, 1000].4) Answer the question in C++ A) What is wrong with the following code segment? enum CarType {GM, FORD, BMW}; int main() { CartType = BMW; return 0; } B) Assume that the addresses of x and y is 0x61feb8 and 0x61feb0, respectively. What will be the values of x, y, p, and q, respectively, when the following code runs successfully? int main() { int x; double y; int* p = &x; double* q = &y; *p = 3; *q = 3.14; increaseByOne(p, q); cout << x << " " << y << endl; cout << p << " " << q << endl; return 0; }void increaseByOne(int*& p1, double* q1){ (*p1)++; (*q1)++; p1++; q1++;} The four value:Write a C++ program to perform addition of two hexadecimal numeralseach with up to 4 hex digits. If the result of the addition is more than 4 hex digitslong, then simply give the output message “Addition overflow” and stop. Use dynamicarrays to store hexadecimal numbers as arrays of characters. Assume the numbers canbe of different length (i.e. if adding hex numbers 12ab + 90 (first number is stored as 4characters in size, second number is stored as 2 characters in size), the second numberwill then be interpreted as 0090 but the leftmost zeros will not be included in the array(the size of the array variable will be useful here). To perform hex addition, you canconvert each individual hex digit to decimal, perform the addition, and then convert tohex, including adding a carry as necessary.