## GATE | GATE-CS-2017 (Set 1) | Question 39

Consider the C functions foo and bar given below: int foo(int val) { int x = 0; while (val > 0) { x = x… Read More »

## GATE | GATE-CS-2017 (Set 1) | Question 38

Consider the expression (a-1) * ((( b + c ) / 3 )) + d)). Let X be the minimum number of registers required by… Read More »

## GATE | GATE-CS-2017 (Set 1) | Question 37

Let G = (V, E) be any connected undirected edge-weighted graph. The weights of the edges in E are positive any distinct. Consider the following… Read More »

## GATE | GATE-CS-2017 (Set 1) | Question 36

Consider a database that has the relation schemas EMP (EmpId, EmpName, DepId), and DEPT(DeptName, DeptId). Note that the DepId can be permitted to be NULL… Read More »

## GATE | GATE-CS-2017 (Set 1) | Question 35

When two 8-bit numbers A7 … A0 and B7 … B0 in 2’s complement representation (with A0 and B0 as the least significant bits) are… Read More »

## GATE | GATE-CS-2017 (Set 1) | Question 34

Consider the following context-free grammar over the alphabet ∑ = {a, b, c} with S as the start symbol: S → abScT | abcT T… Read More »

## GATE | GATE-CS-2017 (Set 1) | Question 33

Let T be a tree with 10 vertices. The sum of the degrees of all the vertices in T is _____. Note: This questions appeared… Read More »

## GATE | GATE-CS-2017 (Set 1) | Question 32

The n-bit fixed-point representation of an unsigned real number X uses f bits for the fraction part. Let i = n – f. The range… Read More »

## GATE | GATE-CS-2017 (Set 1) | Question 31

Consider the language L given by the regular expression (a + b) *b(a +b) over the alphabet {a, b}. The smallest number of states needed… Read More »

## GATE | GATE-CS-2017 (Set 1) | Question 30

Consider the C code fragment given below. typedef struct node { int data; node* next ; } node; void join(node* m, node* n) { node*… Read More »

## GATE | GATE-CS-2017 (Set 1) | Question 29

Consider the following table Match the algorithm to design paradigms they are based on: (A) P-(ii), Q-(iii), R-(i) (B) P-(iii), Q-(i), R-(ii) (C) P-(ii), Q-(i),… Read More »

## GATE | GATE-CS-2017 (Set 1) | Question 28

Consider the Karnaugh map given below, where X represents “ don’t care” and blank represents 0. Assume for all inputs (a, c, d) the respective… Read More »

## GATE | GATE-CS-2017 (Set 1) | Question 27

Consider the following C code: #include <stdio.h> int * assignval (int *x, int val) { *x = val; return x; } int main() { int… Read More »

## GATE | GATE-CS-2017 (Set 1) | Question 26

Consider the C struct defines below: struct data { int marks [100] ; char grade; int cnumber; }; struct data student; The base address of… Read More »

## Probability of getting at least K heads in N tosses of Coins

Given N number of coins, the task is to find probability of getting at least K number of heads after tossing all the N coins… Read More »