Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
Recent questions tagged identify-function
0
votes
1
answer
1
Algo
damz1499
asked
in
Algorithms
Nov 11
by
damz1499
57
views
algorithms
identify-function
1
vote
0
answers
2
TIFR CSE 2022 | Part B | Question: 4
Consider the following algorithm for computing the factorial of a positive integer $n$, specified in binary: prod ← 1 for i from 1 to n prod ← prod i output prod Assume that the number of bit operations required to multiply a $k$-bit positive integer with an $\ell$ ... $\omega(n \log n)$ $O\left(n^3\right)$ but $\omega\left(n^2\right) $ None of the above
admin
asked
in
Algorithms
Sep 1
by
admin
164
views
tifr2022
algorithms
identify-function
time-complexity
1
vote
3
answers
3
ISI2020-PCB-CS: 1.3
What does the following function compute for $x \neq 0?$ float isi1(float x, int y){ if (y==0){ return 1 ;} else if (y>0) {return isi1(x,-y);} else { return isi1(x, y+1)/x;} }
Lakshman Patel RJIT
asked
in
Programming
Aug 18
by
Lakshman Patel RJIT
208
views
isi2020-pcb-cs
identify-function
descriptive
6
votes
2
answers
4
GATE CSE 2021 Set 2 | Question: 23
Consider the following $\text{ANSI C}$ function: int SomeFunction (int x, int y) { if ((x==1) || (y==1)) return 1; if (x==y) return x; if (x > y) return SomeFunction(x-y, y); if (y > x) return SomeFunction (x, y-x); } The value returned by $\textrm{SomeFunction(15, 255)}$ is __________
Arjun
asked
in
Algorithms
Feb 18, 2021
by
Arjun
2.6k
views
gatecse-2021-set2
numerical-answers
algorithms
identify-function
output
4
votes
3
answers
5
GATE CSE 2021 Set 1 | Question: 48
Consider the following $\text{ANSI C}$ function: int SimpleFunction(int Y[], int n, int x) { int total = Y[0], loopIndex; for (loopIndex=1; loopIndex<=n-1; loopIndex++) total=x*total +Y[loopIndex]; return total; } Let $\textsf{Z}$ be an array ... $i$ such that $0 \leq i \leq 9$. The value returned by $\textsf{SimpleFunction(Z},10,2)$ is __________
Arjun
asked
in
Algorithms
Feb 18, 2021
by
Arjun
3.1k
views
gatecse-2021-set1
algorithms
numerical-answers
identify-function
1
vote
2
answers
6
CMI-2020-DataScience-A: 1
Consider the following program. Assume that $x$ and $y$ are integers. f(x, y) { if (y != 0) return (x * f(x,y-1)); else return 1; } What is $f(6,3)?$ $243$ $729$ $125$ $216$
soujanyareddy13
asked
in
Algorithms
Jan 29, 2021
by
soujanyareddy13
475
views
cmi2020-datascience
algorithms
recursion
identify-function
1
vote
1
answer
7
CMI-2020-DataScience-B: 1
For any string $\text{str, length(str)}$ returns the length of the string, $\text{append(str1, str2)}$ concatenates $\text{str1}$ with another string $\text{str2}$, and $\text{trim(str)}$ removes any spaces that exist at the end of the string $\text{str}$ ... 1) { if(str[i] is ' ') { reverse(str, j, i-1); j = i + 1; } } trim(str); return str; }
soujanyareddy13
asked
in
Algorithms
Jan 29, 2021
by
soujanyareddy13
216
views
cmi2020-datascience
algorithms
identify-function
15
votes
4
answers
8
GATE CSE 2020 | Question: 48
Consider the following C functions. int tob (int b, int* arr) { int i; for (i = 0; b>0; i++) { if (b%2) arr [i] = 1; else arr[i] = 0; b = b/2; } return (i); } int pp(int a, int b) { int arr[20]; int i, tot = 1, ex, len; ex = a; len = tob(b ... ; i<len ; i++) { if (arr[i] ==1) tot = tot * ex; ex= ex*ex; } return (tot) ; } The value returned by $pp(3,4)$ is _______.
Arjun
asked
in
Algorithms
Feb 12, 2020
by
Arjun
7.3k
views
gatecse-2020
numerical-answers
identify-function
0
votes
0
answers
9
TIFR CSE 2020 | Part B | Question: 7
Consider the following algorithm (Note: For positive integers, $p,q,p/q$ denotes the floor of the rational number $\dfrac{p}{q}$, assume that given $p,q,p/q$ can be computed in one step): $\textbf{Input:}$ Two positive integers $a,b,a\geq b.$ $\textbf{Output:}$ A positive ... $\Theta(\log K)$ $\Theta({K})$ $\Theta({K\log K})$ $\Theta({K^{2}})$ $\Theta({2^{K}})$
Lakshman Patel RJIT
asked
in
Algorithms
Feb 11, 2020
by
Lakshman Patel RJIT
338
views
tifr2020
algorithms
identify-function
time-complexity
4
votes
3
answers
10
CMI2019-A-9
The next two questions refer to the following program. In the code below reverse$(A,i,j)$ takes an array $A,$ indices $i$ and $j$ with $i\leq j,$ and reverses the segment $A[i],A[i+1],\cdots,A[j].$ ... } reverse(A,i,m); } return; } When the procedure terminates, the array A has been: Sorted in descending order Sorted in ascending order Reversed Left unaltered
gatecse
asked
in
Programming
Sep 13, 2019
by
gatecse
624
views
cmi2019
identify-function
1
vote
3
answers
11
CMI2019-A-10
The next two questions refer to the following program. In the code below reverse$(A,i,j)$ takes an array $A,$ indices $i$ and $j$ with $i\leq j,$ and reverses the segment $A[i],A[i+1],\cdots,A[j].$ For instance if $A=[0,1,2,3,4,5,6,7]$ then, after we ... return; } The number of times the test $A[ j ] > A[ m ]$ is executed is: $4950$ $5050$ $10000$ Depends on the contents of $A$
gatecse
asked
in
Programming
Sep 13, 2019
by
gatecse
370
views
cmi2019
identify-function
4
votes
3
answers
12
CMI2018-A-10
What does the following function compute in terms of $n$ and $d$, for integer value of $n$ and $d,d>1?$ Note that $a//b$ denotes the quotient(integer part) of $a \div b,$ for integers $a$ and $b$. For instance $7//3$ is $2.$ function foo(n,d) ... $n.$ The number of digits in the base $d$ representation of $n.$ The number of ways of partitioning $n$ elements into groups of size $d.$
gatecse
asked
in
Programming
Sep 13, 2019
by
gatecse
513
views
cmi2018
identify-function
8
votes
4
answers
13
GATE CSE 2019 | Question: 18
Consider the following C program : #include<stdio.h> int jumble(int x, int y){ x = 2*x+y; return x; } int main(){ int x=2, y=5; y=jumble(y,x); x=jumble(y,x); printf("%d \n",x); return 0; } The value printed by the program is ______________.
Arjun
asked
in
Algorithms
Feb 7, 2019
by
Arjun
7.2k
views
gatecse-2019
numerical-answers
identify-function
18
votes
8
answers
14
GATE CSE 2019 | Question: 26
Consider the following C function. void convert (int n ) { if (n<0) printf{ %d , n); else { convert(n/2); printf( %d , n%2); } } Which one of the following will happen when the function convert is called with any positive ... order and terminate It will print the binary representation of $n$ but will not terminate It will not print anything and will not terminate
Arjun
asked
in
Algorithms
Feb 7, 2019
by
Arjun
12.2k
views
gatecse-2019
algorithms
identify-function
0
votes
2
answers
15
GATE Overflow | Mock GATE | Test 1 | Question: 26
Consider the two given functions: int fun1(int x, int y) { if (y==0) return 0; return (x+fun2(x, y-1)); } int fun2(int x, int y) { if (x==0) return y; return fun2(x-1, x+y); } What will be the value returned by $\text{fun1}(4, 4)$ ____
Ruturaj Mohanty
asked
in
Algorithms
Dec 27, 2018
by
Ruturaj Mohanty
733
views
go-mockgate-1
numerical-answers
identify-function
recursion
algorithms
3
votes
1
answer
16
GATE Overflow | Mock GATE | Test 1 | Question: 29
Consider the following piece of code: int function(int a[], int n, int x) { int i; for (i=0; i<n && a[i]!=x;i++); if (i==n) return -1; else return i; } A function call is made with the arguments as follows: $a[]=\{5, 32, 1, 9, 7, 2\}$ $n=6$ $x=8$ What will be the value returned by the above code?
Ruturaj Mohanty
asked
in
Algorithms
Dec 27, 2018
by
Ruturaj Mohanty
526
views
go-mockgate-1
numerical-answers
identify-function
algorithms
1
vote
1
answer
17
Test algo
Deepalitrapti
asked
in
Algorithms
Sep 20, 2018
by
Deepalitrapti
359
views
identify-function
output
test-series
0
votes
1
answer
18
#IdentifyFunctions #Algorithms User Gate 2014 Self Doubt
Original Question - here Consider the following C function in which size is the number of elements in the array E: int MyX(int *E, unsigned int size) { int Y = 0; int Z; int i, j, k; for(i = 0; i< size; i++) Y = Y + ... ============= Can someone trace the code by taking some arbitrary values in the array and show how to do this? Thank you!
iarnav
asked
in
Algorithms
Jun 28, 2018
by
iarnav
309
views
algorithms
usergate2014
usermod
identify-function
0
votes
2
answers
19
ISRO2018-7
Assume $A$ and $B$ are non-zero positive integers. The following code segment: while(A!=B){ if*(A> B) A -= B; else B -= A; } cout<<A; // printing the value of A Computes the $LCM$ of two numbers Divides the larger number by the smaller number Computes the $GCD$ of two numbers Finds the smaller of two numbers
Arjun
asked
in
Algorithms
Apr 22, 2018
by
Arjun
3.1k
views
isro2018
algorithms
identify-function
1
vote
1
answer
20
ISRO2018-12
An array $A$ consists of $n$ integers in locations $A[0], A[1], \ldots A[n-1]$. It is required to shift the elements of the array cyclically to the left by $k$ places, where $1<=k<=(n-1)$. An incomplete algorithm for doing this in linear time, without using another array is given ...
Arjun
asked
in
Algorithms
Apr 22, 2018
by
Arjun
3.7k
views
isro2018
algorithms
identify-function
1
vote
0
answers
21
gate 1994
Function what(x, n:integer): integer: Var value : integer begin value := 1 if n > 0 then begin if n mod 2 =1 then value := value * x; value := value * what(x*x, n div 2); end; what := value; end; convert the code in c
Rameez Raza
asked
in
Programming
Jun 14, 2017
by
Rameez Raza
518
views
identify-function
0
votes
1
answer
22
Gate Sample Practise Questions
#include<stdio.h> int f(int *a, int n) { if(n ≤ 0) return 0; else if(*a % 2 = = 0) return *a + f(a+1, n-1); else return *a - f(a+1, n-1); } int main() { int a[] = {12, 7, 13, 4, 11, 6}; printf("%d", f(a, 6)); return 0; } (a) -9 (b) 5 (c) 15 (d) 19 Need explanation stepwise for solution
Pranav Madhani
asked
in
Algorithms
May 26, 2017
by
Pranav Madhani
375
views
geeksforgeeks-test-series
recursion
identify-function
2
votes
1
answer
23
Based on GATE2005-IT-53
https://gateoverflow.in/3814/gate2005-it-53 i am confused about how the while loop breaks if a=''DBC" and b="BD"? i suppose here both occurence of B and D will have zero count in count arrray when for loop is checked. please explain?
nabadeep
asked
in
Algorithms
May 23, 2017
by
nabadeep
327
views
identify-function
2
votes
1
answer
24
Test by Bikram | Programming | Test 2 | Question: 9
Consider the below function: int s (int n) { if (n<=1) return 1 ; n = (n-1) * (n-1) -2 - n * n + 3*n ; s(n); printf(“%d”, n ); } What is the output if initial call is $s(6)$ ? $55555$ $11111$ $54321$ $12345$
Bikram
asked
in
Programming
May 14, 2017
by
Bikram
178
views
tbb-programming-2
identify-function
3
votes
1
answer
25
Test by Bikram | Mock GATE | Test 4 | Question: 40
Consider the below program : #include <stdio.h> void fun (int[0][3]); int main(void) { int k[3][3]= {{1,2,3}, {4,5,6},{7,8,9}}; fun(k); printf("%d\n", k[2][1]); return 0; } void fun(int p[][3]) { ++p; p[1][1] = 9; } The output of the above program is : ______.
Bikram
asked
in
Programming
May 14, 2017
by
Bikram
193
views
tbb-mockgate-4
numerical-answers
programming-in-c
identify-function
50
votes
7
answers
26
GATE CSE 2017 Set 2 | Question: 43
Consider the following snippet of a C program. Assume that swap $(\&x, \&y)$ exchanges the content of $x$ and $y$: int main () { int array[] = {3, 5, 1, 4, 6, 2}; int done =0; int i; while (done==0) { done =1; for (i=0; i<=4; i ... i-1]) { swap(&array[i], &array[i-1]); done =0; } } } printf( %d , array[3]); } The output of the program is _______
Arjun
asked
in
Programming
Feb 14, 2017
by
Arjun
12.8k
views
gatecse-2017-set2
programming
algorithms
numerical-answers
identify-function
Page:
1
2
3
4
next »
Subscribe to GATE CSE 2023 Test Series
Subscribe to GO Classes for GATE CSE 2023
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
-tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Recent Posts
POWER GRID CORPORATION OF INDIA LIMITED
INSTITUTE OF BANKING PERSONNEL SELECTION
GATE Overflow books for TIFR, ISRO, UGCNET and NIELIT
RECRUITMENT IN OIL AND GAS CORPORATION LIMITED
Aptitude Overflow Book
Subjects
All categories
General Aptitude
(2.4k)
Engineering Mathematics
(9.1k)
Digital Logic
(3.2k)
Programming and DS
(5.8k)
Algorithms
(4.5k)
Theory of Computation
(6.6k)
Compiler Design
(2.3k)
Operating System
(4.9k)
Databases
(4.5k)
CO and Architecture
(3.7k)
Computer Networks
(4.5k)
Non GATE
(1.3k)
Others
(2.4k)
Admissions
(647)
Exam Queries
(841)
Tier 1 Placement Questions
(17)
Job Queries
(74)
Projects
(9)
Unknown Category
(855)
Recent questions tagged identify-function
Recent Blog Comments
@abir_banerjee Thanks Abir. I'm third year...
@nolan_keats Currently I am in third year...
@abir_banerjee thank you Abir.Supposing you...
@nolan_keats just a suggestion as I also...
@abir_banerjee Hope I can do this in span of one...