1
GATE CSE 2026 Set 1
Numerical
+2
-0

Consider a CPU that has to execute two types of processes. The first type, Actuators (A), requires a CPU burst of 6 seconds. The second type, Controllers (C), requires a CPU burst of 8 seconds. A new process of type A arrives at time $t=10,20,30,40$, and 50 (in seconds). Similarly, a new process of type C arrives at time $t=11,22,33$, 44, and 55 (in seconds). The CPU scheduling policy is First Come First Serve (FCFS). The first process of type A starts running at $t=10$ seconds. The average waiting time (in seconds) for the 10 processes is $\_\_\_\_$ . (rounded off to one decimal place)

Your input ____
2
GATE CSE 2026 Set 1
Numerical
+1
-0
Consider the following program in C:

#include <stdio.h>

void func(int i, int j) {

    if(i < j) {

        int i = 0;

        while (i < 10) {

            j += 2;

            i++;

        }

    }

    printf("%d", i);

}

int main() {

    int i = 9, j = 10;

    func(i, j);

    return 0;

}

The output of the program is $\_\_\_\_$ . (answer in integer)

Note: Assume that the program compiles and runs successfully.

Your input ____
3
GATE CSE 2026 Set 1
Numerical
+2
-0
Consider the recursive functions represented by the following code segment:

int bar(int n){

    if (n == 1) return 0;

    else return 1 + bar(n/2);

}

int foo(int n){

    if (n == 1) return 1;

    else return 1 + foo(bar(n));

}

The smallest positive integer n for which foo(n) returns 5 is $\_\_\_\_$ . (answer in integer)

Note: Ignore syntax errors (if any) in the function.

Your input ____
4
GATE CSE 2026 Set 1
MCQ (More than One Correct Answer)
+1
-0

Consider the following grammar where $S$ is the start symbol, and $a$ and $b$ are terminal symbols.

$$ S \rightarrow a S b S|b S| \in $$

Which of the following statements is/are true?

A

The grammar is ambiguous.

B

The string $a b b$ has two distinct derivations in this grammar.

C

The string $a b a b$ has only one rightmost derivation.

D

The language generated by the grammar is undecidable.