Question

Given the structure definition in a 32-bit environment: struct contact { char name[22] char gender; int phone; X, What is the total number of bytes used for the object x, including the padding bytes? O A. 27 O B. 28 O C. 30 O D. 32

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1. Total no. of bytes used for object x , including the padding bytes is 28 bytes

Add a comment
Know the answer?
Add Answer to:
Given the structure definition in a 32-bit environment: struct contact { char name[22] char gender; int...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • PLease explain output of these two programs: 1. #include <stdio.h> typedef struct { char *name; int...

    PLease explain output of these two programs: 1. #include <stdio.h> typedef struct { char *name; int x, y; int h, w; } box; typedef struct { unsigned int baud : 5; unsigned int div2 : 1; unsigned int use_external_clock : 1; } flags; int main(int argc, char** argv){ printf("The size of box is %d bytes\n", sizeof(box)); printf("The size of flags is %d bytes\n", sizeof(flags)); return 0; } 2. #include <stdio.h> #include <string.h> /* define simple structure */ struct { unsigned...

  • Given the following program: #include <stdio.h> struct student { int id; char name[20]; char grade; };...

    Given the following program: #include <stdio.h> struct student { int id; char name[20]; char grade; }; void func(struct student stud); int main() { struct student astud; astud.id=9401; strcpy(astud.name, "Joe"); astud.grade = 'A'; func(astud); return 0; } Abdelghani Bellaachia, CSCI 1121 Page: 16 void func(struct student astud) { printf(" Id is: %d \n", astud.id); printf(" Name is: %s \n", astud.name); printf(" Grade is: %c \n", astud.grade); } Modify this program to include the address of a student as a separate structure....

  • struct student { char name[10]; int rank; }; Using the student structure given above, create an...

    struct student { char name[10]; int rank; }; Using the student structure given above, create an array of size 5 students.. Then write a complete C program to sort the students array based on the students rank. Use the following sorting techniques in your code. Don’t forget to print initial array and final (sorted) array. a. Selection sort b. Insertion sort c. Merge sort / Quick sort.

  • Given the following structure: 4. struct int x; float y[10]; bool z; char w } s;...

    Given the following structure: 4. struct int x; float y[10]; bool z; char w } s; and assume that the base address of s is 200, what will be the address of the field w in the structure

  • C++ Question 15 3.95 pts struct Person int age; char gender; double weight: string name; Person...

    C++ Question 15 3.95 pts struct Person int age; char gender; double weight: string name; Person p[35, 'M', 175.5, "Steve"); Which of the options below correctly represents how the structure object p is stored in memory? RAM (Memory) Address Value Address o Address 1 Address 2 Address 3 Address 4 Which of the options below correctly represents how the structure object p is stored in memory? B-) RAM (Memory) Address Value Address 0 Address 1 Address 2 Address 3 Address...

  • #include <iostream> #include<string> #include<vector> using namespace std; struct patient { string name; char Gender; int d,m,y;...

    #include <iostream> #include<string> #include<vector> using namespace std; struct patient { string name; char Gender; int d,m,y; string nationality; int civilID; int phoneNumber; string TypeOfInsurance; }; Activities I. Declare a variable from the struct Patient called pat. II. Fill out the information of pat by reading them from the input. III. Declare a pointer of type Patient called pat_ptr and assign the address of pat to it. IV. Change the value of name field of pat by accessing it through pat_ptr....

  • Canvas → XC D Question 13 Given the code below: typedef struct p { char topic...

    Canvas → XC D Question 13 Given the code below: typedef struct p { char topic [20]; int nunWords; > page; typedef struct mag char name[20]; page pages [250); int numPages; } magazine; magazine m; How would you declare an array of 20 magazines? struct magazine[20] magazine[20] magazine myStack(20) None of the above struct m[191 Question 14 Given the code below: typedef struct char topic[20] Canvas & XC struct m[19] Question 14 Given the code below: typedef struct char topic[20];...

  • 1. Define Structure UNIT as described in the list: ınit char codease complete the question int...

    1. Define Structure UNIT as described in the list: ınit char codease complete the question int numberOfCreditHours int semester int numberOfPreReq; pointer to number of pre-requisites eg:like char preRequisite[numberOfPreReq][10]; char* preReq int numberOfPostReq; pointer to number of post-requisites eg:like char postRequisite[numberOfPostReq] [1 0]; char* postReq NOTE: this is a BIG question and has to be asked seperately, answering only one question here. pluginfile.php/94428/mod resource/content/1/lab 6202 %20 %28file %20and%20parsing % 29.pdf Expected C++Skills to finish this activity Simple data types C++...

  • Define a type which comprises a struct called "Maxima". In this struct contains two int values...

    Define a type which comprises a struct called "Maxima". In this struct contains two int values a and b. The purpose of this struct is to store the largest two int values among a set of integers. The value a is the largest number and the value b is the second largest number. In order to accomplish this task, you need to write the following functions: allzero( struct pointer ): This function sets a and b values in a given...

  • Store information of 5 students using Structure Given details (like roll number, name and marks) of...

    Store information of 5 students using Structure Given details (like roll number, name and marks) of 5 students as an input, read all the details into Student structure and display the content. Input: 1 Jack 72.12 2 Tom 42.42 3 Robert 72.12 4 Michael 72.12 5 James 72.12         where: All lines represent Roll number, Name and Marks respectively. Output: 1 Jack 72.12 2 Tom 42.42 3 Robert 72.12 4 Michael 72.12 5 James 72.12 not sure what to do...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT