New answers tagged

0 votes

Results of a Program After Call By Reference Vs. Call By Value-Result

Just to clean up some confusion: What you call “call by reference” was “call by name” in Algol. In newer languages, “call by reference” will take the address of an object and the function accesses the ...
gnasher729's user avatar
  • 28.4k
1 vote

Guess the output of a c program

Just to make it tidy. int main() { int a, i = 4; int z = 5; a = --i + --i + --z; printf("%d %d", a, i); return 0; } As gnasher729 ...
DrJay's user avatar
  • 186
1 vote

Explanation of a simple example of how an interaction net computes?

Interaction nets are a form of graph rewriting. Nets are graphs made up of some finite number of labelled nodes with connections between them. If two nodes have the same label then they have the ...
marc's user avatar
  • 46
0 votes

What is a safe programming language?

Take this C code: int* p; *p = 1; C is a very unsafe language. p is uninitialised, so it could point anywhere. Likely effects are an immediate crash, overwriting ...
gnasher729's user avatar
  • 28.4k
1 vote

In the simulation of a C-program by a Turing machine, how does a TM determine which instruction to execute?

They aren't trying to show that there is a single Turing machine that can run every C program (although that's also true). They're trying to show that for every C program, there is some Turing machine ...
benrg's user avatar
  • 2,092
1 vote

In the simulation of a C-program by a Turing machine, how does a TM determine which instruction to execute?

The tape of the TM stores the code of the program (the sequence of machine instructions), followed by the memory of the program. You design a TM that traverses back and forth between the code section ...
D.W.'s user avatar
  • 156k

Top 50 recent answers are included