Question
Help fast
:Assume a variable called orange exists of type Fruit pointer. The Fruit structure is defined below. For the variable orange, write a statement that assigns a member variable named hasSeeds to 1 typedef struct Fruit struct f a. &(orange.hasSeeds) 1; b. orange.(hasSeeds) 1 c. orange->hasSeeds 1; d. orange.hasSeeds 1; // menber variables Fruit; Q8: When the malloc function is called, the malloc function returns a(n) a. address on the heap b. address on the stack c. address on static memory d. pointer to automatic memory e. pointer of type (int)
0 0
Add a comment Improve this question Transcribed image text
Answer #1

An swer

Q7.
Option c

Q8:
Option a

Please upvote the solution if it helped. Thanks!

Add a comment
Know the answer?
Add Answer to:
Help fast :Assume a variable called orange exists of type Fruit pointer. The Fruit structure is...
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
  • Mips c 06: Write a line of code that allocates memory to store a structure of...

    Mips c 06: Write a line of code that allocates memory to store a structure of type Fruit on the heap typedef struct Fruit_struct f a. Fruit apple; b. Fruit *apple - malloc( &Fruit); c. Fruit *apple (Fruit *) malloc( sizeof(Fruit) d. Fruit apple (Fruit) malloc( sizeof(apple) ); // member variables Fruit;

  • problem 2 and 3 1. For each variable (a-g) describe whether the variable itself is global...

    problem 2 and 3 1. For each variable (a-g) describe whether the variable itself is global or local, static or not static, and initialized or uninitialized. (Hints: Global variables are always static. Local variables become static when declared with 'static'. For pointers, consider the pointer itself, not anything the pointer might point to.) 2. For each variable (a-g), describe where it is located when DoFunctionB is running. That is, for each variable, describe whether it is on the stack, in...

  • In the following C program, indicate the variable type (global, local, or static local), the lifetime...

    In the following C program, indicate the variable type (global, local, or static local), the lifetime (when the program is run or when the function is called), and the memory allocation (from stack or from heap) for each variable (x, y, z, and w) defined in the program. int w; void fun (int x) { int y; static float z; ... } void main() { fun(w); }

  • TRUE/FALSE 1. If pl is an integer pointer variable, with the value of 1000, pl++ changes...

    TRUE/FALSE 1. If pl is an integer pointer variable, with the value of 1000, pl++ changes P1 to point to the memory location 1001. ANSWER: T 2. When you return a dynamic array to the freestore, you must include the number of elements in the array 3. You can assign an array to a pointer variable. 4. The size of dynamic arrays must be declared at compile time. 5. int *pl; declares a static variable. ANSWER: F ANSWER: F ANSWER:...

  • 8. Given: struct STACK INF RC 1301 int top that the following functions have already been...

    8. Given: struct STACK INF RC 1301 int top that the following functions have already been declared in a stack tolkit and are available for create stack(s) push(s, item) pop(s, item) topls, item) empty(s) Boolean function use some or all of them to write the complete definition code for a function that passes in a stack (as an argument), removes the SECOND assume that there are at least two items in the stack). item (from the top) in the stack,...

  • If void * is a pointer to void is a "generic" pointer type, and a void...

    If void * is a pointer to void is a "generic" pointer type, and a void * can be converted to any other pointer type * without an explicit cast, why in the ,myarrcopy function the malloc is created like char and not like void? if we are going to work with different type of arrays? Here is de program: *This is a function that make a copy of any given array. * We then use this function make a...

  • C programming. 1.Create a program that does the following - Creates three pointers, a character pointer...

    C programming. 1.Create a program that does the following - Creates three pointers, a character pointer professor, and two integer pointers student_ids, grades - Using dynamic memory, use calloc to allocate 256 characters for the professor pointer - Prompts the professor for their name, and the number of students to mark. - Stores the professor’s name using the professor pointer and in an integer the number of students to mark. - Using dynamic memory, use malloc to allocate memory for...

  • Question 11 pts Fill in the blank. Two functions are defined main.c and MyAge.c   // FILE...

    Question 11 pts Fill in the blank. Two functions are defined main.c and MyAge.c   // FILE main.c main ( ) { _______ int age ; printf ( " the value of age is %d \n", age ) ; } // FILE MyAge.c int age = 10; int MyAge ( ) { } Group of answer choices static external internal extern Flag this Question Question 21 pts Fill in the blank. Two functions are defined main.c and MyAge.c   The below program...

  • 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...

  • Enum {FALSE=0, TRUE}; #define MAXBUFF 1024 #define SMALLBUFF 10 /* The LinkNode type is used as a...

    enum {FALSE=0, TRUE}; #define MAXBUFF 1024 #define SMALLBUFF 10 /* The LinkNode type is used as an element of a linked list ** implementation of a stack of tree nodes. */ typedef struct link_t LinkNode; typedef LinkNode *LinkNodePtr; /* The TreeNode type is used as an element of a binary "parse" tree. ** Tree nodes are created while parsing the RPN expression and ** stored on a stack until it's time to place them. */ typedef struct tree_t TreeNode; typedef...

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