Learning

open
close

Practice Exercises

August 10, 2025 | by Bloom Code Studio

List three pros or cons about each level of language in terms of execution time, complexity, readability, abstraction, and speed of development.

Write 8086 assembly code to add the values 1 and 3 together. The registers abx and cdx are available to use for this operation and the result should be stored in abx.

Write a main function in C that calls another function to add the numbers 1 and 3 together and return the sum as an output parameter. Finally, print out the answer to the console.

Write a main method in Java that calls another method to add the numbers 1 and 3 together and then print out the answer to the console.

Write the GCC commands to compile file1.c, file2.c and file3.c and then link the object files to create a static library titled myLib

Write a main function in C that calls a public function titled PrintList() in a module titled listOperations

Write a C module that includes 2 global integer variables declared in the file titled variables.h and then print the global variables in a main function that exists in main.c.

Write a Git command to pull changes from a repository on your local host machine with the URL “https://localhost/MyRepository” into your working repository checkout.

Write a GCC command to compile a C file titled main.c that includes a static library titled myStaticLib.

Trace the following C code and list the contents of the array after the iteration.

int main() {
  int List[5];
  int a = 10;
  for (int i = 0; i < 5; i++)
  {
    List[i] = a + i;
  }
  return 0;
}

The following is a C “hello world” program that uses OpenMP. How many lines of messages will this program generate at runtime?

#include 
int main() {
  int x = 1;
  int y = x + 2;
  #pragma omp parallel num_threads(y * 3)
  {
    printf("https://helloacm.com\n");
  }
  return 0;
}

Write a C module that creates four threads to call a function that prints the thread number out.

RELATED POSTS

View all

view all