Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

21.True of False write beside cach option whether it is true or false 1. If the

ID: 3736166 • Letter: 2

Question

21.True of False write beside cach option whether it is true or false 1. If the rame stack contains 250 frames then the program has called a recursive function 2. The function memcpy (dst, src, ) copies bytes from address location src to address location dst. The number of copied bytes is size 3. The first function in the frame stack is main ) 4. If a progam is called with two command linc parameters (e.g., ofp fi.text £2. txt) the value of argc that is passed to main is 2. 5. When a program executes then the trame stack must contain at least two functions 6. The scope of a variable is the block of code that it is declared in 7. Function parameters are stored in the frame stack 8. Static variables that are declared in a function are stored in the frame stack 9. The functdion malloc ) allocates memory from the heap and initializes all the bytes to 0 10. The statement int p-(int ) malloc (100) allocates memory for 100 integers

Explanation / Answer

1)TRUE

Explanation:if the frame stack many frames then the programm call itself.

2)True

explanation: void *memcpy(void *str1, const void *str2, size_t n)

str1 This is pointer to the destination array where the content is to be copied, type-casted to a pointer of type void*.

str2 This is pointer to the source of data to be copied, type-casted to a pointer of type void*.

n This is the number of bytes to be copied.

3)TRUE

4)False

explanation: the file itself treated as one Arguement argv[0].next are treated as the parameter argv[1].....i,e total n parameter gives n+1 length

5)True

explanation: one main() and anthor is Functional related function

6)True

explanation:consider example, If i am declared 'a' in one fun() that is not accessed in main() and any other function.

7)True

8)TRUE

Explanation:each are stored in seperate location

static variables ----stores in---> data (correct){segment}

9)TRUE

explanation:The malloc() function allocates size bytes and returns a pointer to the allocated memory. The memory is not initialized. If size is 0, then malloc() returns either NULL, or a unique pointer value that can later be successfully passed to free().

10)FALSE

follow the syntax:

void *p = malloc(sizeof(int));

or
int *p = (int *)malloc(sizeof(int));

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote