logo

Crowdly

Browser

Add to Chrome

Процедурне програмування (кіббез)

Looking for Процедурне програмування (кіббез) test answers and solutions? Browse our comprehensive collection of verified answers for Процедурне програмування (кіббез) at distedu.ukma.edu.ua.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

Given the following code:

int g (int x, int y) {

  switch(x - y) {

  case 0:

   return x;

  case 4:

    y = y + 1;

    break;

  case 7:

    x = x - 1;

  case 9:

    return x*y;

  case 3:

    y = x + 9;

  default:

    return y - x;

  }

  return y;

}

What is the output for g(3, 0)?

View this question

What is the time and space complexity of this function?

int g(int arr[], int n, int target) {

   int low = 0, high = n - 1;

   while (low <= high) {

       int mid = (low + high) / 2;

       if (arr[mid] == target) {

           return mid; 

       } else if (arr[mid] < target) {

           low = mid + 1; 

       } else {

           high = mid - 1;

       }

   }

   return -1;  

}

0%
100%
0%
0%
View this question

What is the range for the short type if it consists of 16 bits?

0%
0%
0%
100%
View this question

Consider the following operation that overflows:

unsigned char c = 3;

c -= 5;

What value does c have after the above statements are executed? (Give your answer as a decimal integer.)

View this question

Consider the following code:

int f(int num, int bit) {

    int mask = ~(1 << bit);

    return num & mask;

}

What is the result of the function f(5,2)?

0%
0%
0%
0%
View this question

In IEEE 754 single-precision floating-point representation, how many bits are allocated for the mantissa and the exponent?

0%
0%
100%
0%
View this question

What is a function prototype?

0%
0%
0%
0%
View this question

What is the default initialization value of a global variable in C if no explicit initializer is provided?

0%
0%
0%
0%
View this question

What is the largest numerical value that can be represented by a signed char? (Give your answer as a decimal integer.).

View this question

Consider the following program:

    int a = -1;

    int b = a * 5.4;

    printf("%d %.3f\n", a, (float)b);

Write the program output.

View this question

Want instant access to all verified answers on distedu.ukma.edu.ua?

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

Browser

Add to Chrome