Complete GATE CSE 2026 Paper 2 overview, original pages and practice · Timed previous-paper practice

Questions 61–63 of 65. Imported answers require review unless explicitly marked reviewed.

Paper practice 65 questionsPage 21 of 22

Question 61

Open question
CS2NAT2 marksNeeds review
Consider the following ANSI-C function.
int func(int start, int end){
int length=end+1-start;
if((length<1)||(start<0)||(end<0)){ return(0); }
if(length%3==0){
return(func(start+1, end));
} else if(length%3==1){
return(1+func(start, end-1));
} else {
return(func(start+2, end));
}
}
The maximum possible value that can be returned from this function is __________. (answer in integer)
Note: Ignore syntax errors (if any) in the function.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 62

Open question
CS2NAT2 marksNeeds review
The determinant of a 4 × 4 matrix A is 3. The value of the determinant of 2A is __________. (answer in integer)

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 63

Open question
CS2NAT2 marksNeeds review
Suppose an unbiased coin is tossed 6 times. Each coin toss is independent of all previous coin tosses. Let E_1 be the event that among the second, fourth, and sixth coin tosses, there are at least two heads. Let E_2 be the event that among the first, second, third, and fifth coin tosses, there are equal number of heads and tails.
The conditional probability P(E_1|E_2) is equal to __________. (rounded off to one decimal place)

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer