logo

Crowdly

Browser

Add to Chrome

Computer systems

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!

Consider the following C program:

#include <stdio.h>

#include <stdlib.h>

#include <math.h>

double* f(double* q) {

q = malloc(sizeof(double));

*q = log(3.0); // 1.098612

return q;

}

int main(void) {

double x = 9.8;

double* ptr1 = &x;

double* ptr2 = f(ptr1);

printf("%f\n", *ptr2);

free(ptr1);

return 0;

}

Tick all the correct statements.

Penalty for wrong ticks.

0%
0%
0%
0%
0%
0%
0%
View this question

Consider the following C program:

#include <stdio.h>

#include <stdlib.h>

void f(int* q) {

q = malloc(sizeof(int));

*q = 45;

}

int main(void) {

int i = 3;

int* ptr = &i;

f(ptr);

printf("%d %d\n", i, *ptr);

return 0;

}

Tick all the correct statements.

Penalty for wrong ticks.

0%
0%
0%
0%
0%
View this question

Why might an end-system send an Address Resolution Protocol (ARP) message?

(Many answers may apply.)

0%
0%
0%
0%
0%
View this question

In which case(s) does a link-layer switch broadcast a packet?

(Many answers may apply.)

0%
0%
View this question

Which of the following statements about forwarding tables are true?

0%
0%
View this question

Which of the following statements about IP forwarding tables are true?

(Many may be true.)

0%
0%
0%
0%
0%
View this question

Which of the following statements about the Address Resolution Protocol (ARP) are true?

(Many may be true.)

0%
0%
View this question

What would happen if IP addresses were flat, hence not location-dependent?

0%
0%
0%
View this question

Which of the following statements about MAC addresses are true?

0%
0%
View this question

Based on what we said in class, which of the following statements are true? 

(Many may be true.)

0%
0%
0%
0%
View this question

Want instant access to all verified answers on moodle.epfl.ch?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome