1. Home
  2. questions

Filters

Found 5 Questions

Set Default
Subjects

List of practice Questions

Consider the following C code segment:

int x = 126, y = 105;
do {
    if (x > y)
        x = x - y;
    else
        y = y - x;
} while (x != y);

printf("%d", x);

The output of the given C code segment is ____________. (Answer in integer)

  • GATE CS - 2025
  • GATE CS
  • Programming and Data Structure
  • Programming in C

Consider the following C program:

  • GATE CS - 2025
  • GATE CS
  • Programming and Data Structure
  • Programming in C

Consider the following C program:

  • GATE CS - 2025
  • GATE CS
  • Programming and Data Structure
  • Programming in C

Suppose in a multiprogramming environment, the following C program segment is executed. A process goes into the I/O queue whenever an I/O related operation is performed. Assume that there will always be a context switch whenever a process requests an I/O, and also whenever the process returns from an I/O. The number of times the process will enter the ready queue during its lifetime (not counting the time the process enters the ready queue when it is run initially) is _________ (Answer in integer).

  • GATE CS - 2025
  • GATE CS
  • Programming and Data Structure
  • Programming in C


  • GATE CS - 2025
  • GATE CS
  • Programming and Data Structure
  • Programming in C
contact us
terms & conditions
Privacy & Policy
© 2026 Patronum Web Private Limited