Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Using an integer constant, declare an array of size of 5 to store integers.
In a loop of your choice, generated seeded random integers between 65 and 90, inclusive.
They are the ASCII values of the characters ‘A’ through ‘Z’. You need to generate one
integer at a time and store in the array.
In a second loop, display the content of the array but in character format. In other words,
instead of displaying the integer stored in the array, you need to display the character
equivalent of each randomly generated integer.
$ ./a.out
VXUIA
$ ./a.out
PTHUI
$ ./a.out
ZNTIL
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Write a ‘for’ loop to calculate ‘sum2’ (sum of all elements of column ‘2’) and ‘sum3’ (sum of all elements of column ‘3’).then write an ‘if’ statement to check whether ‘sum2’ is greater than ‘sum3’. If True, use ‘fprintf’ function to print ‘sum2 is higher’ in your command window.Use array operations to find element-by-element multiplication of column ‘2’ and column ‘3’.2 FOR MATLAB! Thanks :) the document can be named something like sample.xlsxarrow_forwardCreate a DWORD array named 'z’ of size 3 using DUP operator. Leave the array 'z' uninitialized. You can denote the items in the array as [Zo, z1, z2], where z, is the first item, z, is the second item, z, is the third item Update each array item using the following expressions. Ζox+ 130 Z13 у — х + Zo Z2 = r + x – Z1 Where x, y, r are 16-bit integer memory variables. x = 10, y= 15, r=4 Use mov, movzx, movsx, add, sub instructions only. (hint: Do not alter the value of x, y and r during the computation. Transfer them to appropriate registers to do computation) At the end, open memory window to see the variable z stored in memory (little endian format). Use the debugger to verify your answer. Submit the following: Rename the asm file using your last name as Lastnamel.asm Screenshot of the code and memory window showing the content of the variable z (little endian format).arrow_forwardThe Fibonacci numbers are 0, 1, 1, 2, 3, 5, 8, 13, ... where each number (after the first two values) is the sum of the previous two numbers. Write a program that declares an integer array called fib_numbers with a length of 25 elements. The program then fills the array with the first 25 Fibonacci numbers using a loop. The program then prints the values to the screen using a separate loop.arrow_forward
- Create an array called sales to monitor one week's worth of sales over the course of two months. Assign sales data to the array's elements. Then, in a loop, compute the average sales for the one week of each of the two months that are recorded in the array.arrow_forwardTicTacToeCreate the board display the board Set token to ‘x’Loop //at most 9 times, but end loop when someone wins{ Ask player where to place token display the board Checks if won Change token (if it was ‘x’ change to ‘o’ and vice versa)}Either congratulate someone on winning or say it was a draw. Create a 17x17 array of characters and put ‘ ‘ in each element.2. Write a loop to make the first horizontal line, and another to do the second horizontal line3. Write a loop to make the first vertical line, and another to create the second vertical line4. Put in the numbers (this is so the player can choose where to put the token). You will need 9 separate assignment statements.arrow_forwardUse an array. The program should read 25 integers from a user. Each value should be between 5- 100 (5<-value<-100). As the user inputs values store all the values which are not a duplicate. Print all the array values at the end. Use the smallest possible array.arrow_forward
- In Python, Create a 2 ×4 Numpy array filled with zeros. Using a nested for loop enter int grade valuesto all elements of the array (assume the first row is Fall Semester and the second row is SpringSemester).arrow_forwardCreate a Console application that does the following:This program must use a single array to store integers and find the minimum value.1. Create an array that can hold up to 100 integers.2. Prompt the user for the number of integers to be stored in the array.3. Prompt the user for the integers to be stored in the array.4. Use a loop to iterate through the array and determine the minimum value.arrow_forwardWrite a loop snippet (just a piece of code, not the whole program) that will sum every third element in a 1D array. The size of the array is held in the variable MAX. You will start with the first element in the array. The name of the array is testarray.arrow_forward
- Can you write it in Java, add comments Create an application containing an array that stores eight integers. Prompt the user to enter the 8 integers. The application should call five methods that in turn (1) display all the integers, (2) display all the integers in reverse order, (3) display the sum of the integers, (4) display all values less than the calculated average value, and (5) display all values that are higher than the calculated average value. Save the file as ArrayMethodDemoarrow_forwardPlease use java as the programing language and write comments! Thanks!arrow_forwardWrite a program to allow a user to play the game, Hangman. DO NOT USE AN ARRAY The program will generate a random number (between 1 and 4581) to pick a word from the file - this is the word you then have to guess. Note: if the random number you generate is 42, you need the 42nd word - so loop 41 times picking up the word from the file and not doing anything with it, it is the 42nd you need. Here is how you will do this: String word: for (int k=0; k<41; k++) {word=scnr.nextLine(); }//end loop and now pick up the word you want word=scnr.nextLine() //this is the one you want The user will be allowed to guess a letter as many times as it takes - but 10 wrong guesses and they lose!! Eventually either they won or lost. In case they lost print out the answer. Javaarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education