Conceptual Questions

Conceptual Questions

1 .
Why are low-level languages like assembly language not portable?
2 .
Why do multiple computational models exist? Why don’t we just use one model for everything?
3 .
What are some disadvantages with structured programming languages like C?
4 .
Why does the execution speed of software matter? Describe a scenario where slow execution speed would impact a computer user negatively.
5 .
What is an advantage of low-level programming over high-level programming?
6 .
What is the best way to use GOTO in the structured paradigm?
7 .

For each of the following programming languages: investigate the language. Is the language low-level, middle-level, or high-level? Which of the paradigms covered in this section apply to the language (imperative, declarative, functional, structured, procedural, object-oriented)? Cite your sources.

  1. Fortran
  2. Haskell
  3. Smalltalk
8 .
What is the output of the following C program, and what is the program’s purpose here?
#include <stdio.h>
int main() {
  int a=10;
  int *b=&a;
  printf("%d", b);
  printf("\n");
  printf("%d", &a);
  printf("\n");
  printf("%d",*b);
  return 0;
}
9 .
What is the output of the following C program, and what is the program’s purpose here?
#include <stdio.h>
int main()
{
  int arr[2][3] = { 10, 20, 30, 40, 50, 60 };
  printf("Array:\n");
  for (int i = 0; i < 2; i++) {
    for (int j = 0; j < 3; j++) {
      printf("%d ",arr[i][j]);
    }
    printf("\n");
  }
  return 0;
}
10 .
Compare and contrast static linking of a program with dynamic load-time linking. What are the advantages and challenges of each?
11 .
Compare and contrast dynamic load-time linking of a program with dynamic run-time linking. What are the advantages and challenges of each?
12 .
Non-parallel programs work, and parallel programming can be difficult. Why is it important for programmers to make the effort to make their programs parallel? Why not stick with non-parallel programming?
13 .
Why is it difficult for developers to use the multi-threaded programming paradigm in order to fully utilize the capabilities of today’s available multicore processors?
14 .
Do you need to know how to assemble hardware and draw schematics to implement firmware for embedded systems?