Looking for Computer systems test answers and solutions? Browse our comprehensive collection of verified answers for Computer systems at moodle.epfl.ch.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
Assume that x is a double variable and that f is a pointer to a function taking a double and returning a double.
Tick all the possible calls to f.
Penalty for wrong ticks.
What does the following code print?
#include <stdio.h>
#include <string.h>
void f(char* string)
{
const size_t size = strlen(string);
if (size >= 8) string[7] = '\0';
if (size >= 5) string[4] = 'a';
puts(string);
}
int main(void)
{
f("How qre you?");
return 0;
}
What is the correct way to define a type funct to point to a function taking a pointer to an int an returning a pointer to an int?
We want to write a generic function that can add all the elements of an array (of unknown type, e.g. real numbers, complex numbers, vectors, matrices, ...) and get the result of the sum (of unknown type), either as a return value or passed by reference (then returning some error code).What are the possible prototypes for such a function?
Penalty for wrong ticks.
Select all the correct statements about a void*
variable.Penalty for wrong ticks.
Consider a system that uses paging. Which of the following statements are true?
Many may be true.
Which of the following statements about the Table Look-aside Buffer (TLB) are true?
Many answers may be correct.
[Don't be alarmed if this question feels hard. Just try your best.]
This is the complete page table of a process:
Page 0 ---> Frame 0
Page 1 ---> Frame 10
Page 2 ---> Frame 3
Page 3 ---> Frame 203
Page 4 ---> Frame 127
Page 5 ---> Frame 67
Page 6 ---> Frame 84
Page 7 ---> Frame 16
Assume that these pages cover the entire virtual address space of the process.
Which of the following statements are certainly true about the system where this process belongs?
Many may be certainly true.
[Don't be alarmed if this question feels hard. Just try your best.]
Consider a system where each virtual memory address consists of:
Which of the following statements are true?
Many may be true.
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!