4. What is the output of the following?
struct customer *ptr = malloc( sizeof( struct customer ) );
Given the sample allocation for the pointer "ptr" found above, which one of the following statements is used to reallocate ptr to be an array of 10 elements?
Pick ONE option
a.ptr = realloc( ptr, 10 * sizeof( struct customer));
b.realloc( ptr, 9 + sizeof( struct customer ) );
c.ptr += malloc( 9 * sizeof( struct customer));
d.ptr = realloc ptr, 9 * sizeof( struct customer));
e.realloc( ptr, 10 * sizeof( struct customer ));
clear Selection
Answers
Answered by
0
Answer:
. A bit field is
a) A pointer variable in a structure.
b) One bit or a set of adjacent bits within a word
c) A pointer variable in a union
d) Not used in C
View Answer / Hide Answer
2. Union differs from structure in the following way
a) All members are used at a time
b) Only one member can be used at a time
c) Union cannot have more members
d) Union initialized all members as structure
View Answer / Hide Answer
3. What type of structure is created by the following definition?
struct first { . . . ; struct second *s};
struct second { . . . ; struct first *f};
a) Nested structure
b) Self-referential structure
c) Invalid structure
d) Structured structure
View Answer / Hide Answer
4. Identify the wrong syntax
Explanation:
make me brainlist
Similar questions