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
Question
Based on the following C code:
{
int x, y, z, sum, total;
int *pt1, *pt2, *ptc;
x = 99;
y = 86;
pt1 = &y;
pt2 = pt1;
ptc = &x;
z = (*(&y))/2 + (*pt2)/3 + 5;
sum = (x + y + *pt1 + *pt2 + z)/3;
total = sum + *ptc + *pt1;
}
(1) What is the value of z? (2) What is the value of sum? (3) What is the value of the
total? (4) What is the address of the data 86?
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 4 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
- c/c++arrow_forwardC programming #include <stdio.h>int main() {int i, j, n ;printf("height? ") ;scanf("%2d", &n) ;for (i = 1 ; i <= n ; i++) {// printf("%d: ", i) ;for (j = 1 ; j <= i ; j++) {// Pick *one* of the following// printf("%d", j % 10) ;printf("*") ;}printf("\n") ;}return 0 ;} How can I get output like this by editing the given programming -- height? 5************************* and then how can I get the following?- height? 7 1 123 12345 1234567 123456789 12345678901 1234567890123arrow_forwardCreate a program in c ++ using the concepts about Pointers (Pointers) Given a string "Hola Mundo": Prints on one line the letter of the index 0, the content of the pointer and the letter M. (using the pointer)Modify pointer to pointer + 2In another line print the content of the pointer the letters n and d of the string (using the pointer) An example is shown in the image Note: Create the program in c ++arrow_forward
- C++arrow_forwardConvert C/C++ code to MIPS Codearrow_forwardC++ CODE ONLY: Write a program that takes as input five numbers and outputs the mean (average) and standard deviation of the numbers. If the numbers are X₁, X2, X3, X4, and x5, then the mean is X = (X1 + X2 + X3 + x4 + x5 ) / 5 and the standard deviation is: (x₁−x)²+ (x₂-x)²+ (x¸¯x)²+(x¸−x)²+(x¸¯x)² S = 5 Your program must contain at least the following functions: 1. a function that calculates and returns the mean; and, 2. a function that calculates the print standard deviation. Input 1.5 integers Output Enter five numbers: 2 3 9 10 11 The mean is 7.00. The standard deviation is 3.742. Enter five numbers: 7 7 8 9 11 The mean is 8.40. The standard deviation is 1.497.arrow_forward
- C++arrow_forwardWrite C assignment statements for the following: a. Assign a value of 0 to a variable called between if n is less than -k or greater than +k; otherwise, assign 1. b. Assign a value of 1 to a variable called divisor if digit is a divisor of num; otherwise, assign a value of 0. c. Assign a value of 1 to a variable called lowercase if ch is a lowercase letter; otherwise, assign a value of 0.arrow_forwardmain.c pattern2.h 3. 333221(from codeChum, modified) #include #include"pattern2.h" int main(void) { int num = getNum(); display(num); return 0; 2 by Catherine Arellano 3 4 Make a C program that will output the figure below. 5 Implement the following functions: 国 7 int getNum(); *accepts input from the user.*/ void display(int num); /*prints the number pattern*/ Note: 1. Use only while loop. 2. You are not allowed to edit main.c and pattern2.h. Input A single line containing the number of rowsarrow_forward
arrow_back_ios
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