Computer Science and Information Technology
2026 · Paper 2
Take it one question at a time. Try an answer, then check your understanding.
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.
Question 61
Open questionCS2NAT2 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 answerQuestion 62
Open questionCS2NAT2 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 answerQuestion 63
Open questionCS2NAT2 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