logo

Crowdly

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 function:

void incr(char** ptr)

{

++ptr;

}

and the following code excerpt (i.e a part of a code that is elsewhere correct),

where you have to add two instructions, one for u and one for v:

char msg[] = "CS-202";

char* tab[] = { msg + 1, msg + 3 };

char* p = msg + sizeof(msg) - 1;

char** u = tab;

char** v = &p;

incr(u);

// add one statement on u

// add one statement on v

for (char* r = *u; r < *v; ++r) putchar(*r);

What should be added (one instruction for u and one instruction for v) so that the above code prints "20"?

Penalty for wrong ticks.

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

On a 64-bit architecture, with

const char* s1 = "12345";

char tab1[] = "43210";

and

void f(const char* s2, char tab2[]);

which of the following statements are true?

Statements involving s1 and tab1 are (of course) considered in the scope of s1 and tab1;

statements involving s2 and tab2 are considered in the body of f() and evaluated during the call f(s1, tab1).

Penalty for wrong ticks.

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

An Internet router has the following entries in its forwarding table:

  • IP prefix 5.0.0.0/8 --> output link 1.
  • IP prefix 5.0.0.0/24 --> output link 2.
A packet arrives at the router with destination IP address 5.0.0.10. Which output link will the router choose?

0%
View this question

Is it possible that two packets with the same destination IP address are going to (are intended for) two different destination end-systems? If multiple answers make sense, choose the single best one.

To answer this question, do consider of Network Address Translation (NAT).

0%
0%
View this question

Based on what we said in class, which of the following sources of information does an Internet router use to determine where to send a packet next (which is the correct output link for the packet)?

When answering this question, don't worry about Network Address Translation -- pretend it doesn't exist.

(Many answers may be true.)

0%
0%
View this question

Based on what we said in class, which of the following statements about circuit-switched and packet-switched networks are true? 

(Many may be true.)

0%
0%
0%
View this question

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

(Many may be true.)

View this question

Which of the following IP prefixes contain IP address 1.1.1.1? 

(Many answers may be true.)

0%
View this question

What is "self clocking" in the context of TCP congestion control?

0%
0%
View this question

Which of the following statements related to flow control and congestion control are true?

(Many may be true.)

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!