challenge array 11 How many bytes are allocated to sentence?

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

challenge array 11

How many bytes are allocated to sentence?

 
#define MAX _A 50
#define MAX_B 20
typedef double arr2D [MAX_A] [MAX_B];
typedef char string[MAX_B];
typedef string arrWords [MAX_A];
void f1(double);
void f2(double []);
void f3(double [][MAX_B]);
void f4(double *);
void fa(char);
void fB(char *);
void fc (string);
void fD(
);
int
main()
{arr2D aValues; /*assume aValues is allocated space starting at
address 0030 (in decimal). */
string strA, strB; /* assume strA is allocated space at starting at
address 8050 (in decimal). */
arrWords sentence; /*
assume sentence is allocated space starting at
address 9070 (in decimal). */
//Assume all variables are initialized with values.
// to be replaced with code or function call (in the succeedin questions)
return 0;
}
Assume the following: sizeof(char) = 1, sizeof(int) = 4, sizeof(double) = 8
Answers not following the encoding instructions below will not be considered.
Encoding Instructions:
1. For questions that expect a numeric answer, place the number only. Do not use worded form. Do not put any unit. Do not use the constant identifier. Do not answer with a formula. Do not put leading zeroes.
2. If the answer is an address, the answer is supposed to be in decimal (not hex).
3. If the answer is a character, the answer is the character literal, not the ASCII value.
4. For character or string answers, do not put the quotation anymore.
5. If it is a fill-in-blank question, your answer should only indicate whatever is supposed to be placed in the blank. For example, () or ; might already be given, thus should not be included in the answer.
6. If the result will cause an error (eg. syntax or logical, like index out of bounds), the answer should be INVALID (in all capital letters)
Transcribed Image Text:#define MAX _A 50 #define MAX_B 20 typedef double arr2D [MAX_A] [MAX_B]; typedef char string[MAX_B]; typedef string arrWords [MAX_A]; void f1(double); void f2(double []); void f3(double [][MAX_B]); void f4(double *); void fa(char); void fB(char *); void fc (string); void fD( ); int main() {arr2D aValues; /*assume aValues is allocated space starting at address 0030 (in decimal). */ string strA, strB; /* assume strA is allocated space at starting at address 8050 (in decimal). */ arrWords sentence; /* assume sentence is allocated space starting at address 9070 (in decimal). */ //Assume all variables are initialized with values. // to be replaced with code or function call (in the succeedin questions) return 0; } Assume the following: sizeof(char) = 1, sizeof(int) = 4, sizeof(double) = 8 Answers not following the encoding instructions below will not be considered. Encoding Instructions: 1. For questions that expect a numeric answer, place the number only. Do not use worded form. Do not put any unit. Do not use the constant identifier. Do not answer with a formula. Do not put leading zeroes. 2. If the answer is an address, the answer is supposed to be in decimal (not hex). 3. If the answer is a character, the answer is the character literal, not the ASCII value. 4. For character or string answers, do not put the quotation anymore. 5. If it is a fill-in-blank question, your answer should only indicate whatever is supposed to be placed in the blank. For example, () or ; might already be given, thus should not be included in the answer. 6. If the result will cause an error (eg. syntax or logical, like index out of bounds), the answer should be INVALID (in all capital letters)
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Array
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
Recommended textbooks for you
Database System Concepts
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)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education