subject

Consider the following code: #include #include int main(void) { int *x = malloc(sizeof(int) * 5); for(int i = 0; i < 5; i++) { *(x+i) = i; } code a return 0; } assume that size of an integer is 4 bytes and value of x to be 1000 in decimal. which of the the following 4 cases for code a are correct? 1. if code a is: int *y = x+1; printf("%d %d %d", x, y, y-x); output will be: 1000 1001 1 2. if code a is: printf("%d ", *x); x += 2; printf("%d", x); output will be: 0 2 3. if code a is: int *y = x + 4; printf("%d %d %d" , x, y, *(y-3)); output will be: 1000 1016 1 4. if code a is: int *y = x + 2; printf("%d %d %d" , x, y, y-x); output will be: 1000 1008 2

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:40
Nims is applicable to all stakeholders with incident related responsibilities. true or false
Answers: 1
question
Computers and Technology, 23.06.2019 15:30
The processing of data in a computer involves the interplay between its various hardware components.
Answers: 1
question
Computers and Technology, 24.06.2019 12:00
Which spreadsheet operation does a look function perform?
Answers: 1
question
Computers and Technology, 24.06.2019 14:30
Two students are discussing electricity that has a frequency of 60 hz. student a says that this type of electricity is referred to as ac. student b says that in this type of electricity, the electrons flow in only one direction. which of the following statements is correct? a. only student a is correct b. only student b is correct c. both of the two students are correct d. neither of the two students is correct
Answers: 1
You know the right answer?
Consider the following code: #include #include int main(void) { int *x = malloc(sizeof(int) * 5);...
Questions
question
Physics, 21.04.2021 15:00
question
Mathematics, 21.04.2021 15:00
question
Mathematics, 21.04.2021 15:00
question
Mathematics, 21.04.2021 15:00
question
Mathematics, 21.04.2021 15:00
question
English, 21.04.2021 15:00
question
Physics, 21.04.2021 15:00
question
Mathematics, 21.04.2021 15:00
Questions on the website: 13722367