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
5
votes
1
answer
1
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 17
Consider the following function. If $n$ and $\mathrm{k}$ are positive integers, then the least value of $\mathrm{k}$ such that $\mathrm{f}(\mathrm{k})>n$ is approximately $\log _2\left(\log _2 n\right)$ $\log _2 n$ $n \log _2 n$ $2^n$
GO Classes
asked
in
Algorithms
Feb 5
by
GO Classes
433
views
goclasses2024-mockgate-14
algorithms
identify-function
time-complexity
1-mark
5
votes
1
answer
2
GO Classes Test Series 2024 | Mock GATE | Test 12 | Question: 30
Consider the following pseudocode for a function that operates on an $\textsf{N}$ element array $\textsf{A[1],A[2]},\dots,\textsf{A[N]}$ of integers. function mystery (A[1...N]) { int i,j,position,tmp; for i=1 to N { position= ... ; } } If $\textsf{N = 100,}$ how many times is the comparison $\textsf{A[j] < A[position]}$ checked?
GO Classes
asked
in
Algorithms
Jan 21
by
GO Classes
457
views
goclasses2024-mockgate-12
goclasses
numerical-answers
algorithms
identify-function
time-complexity
2-marks
0
votes
1
answer
3
function call
int foo(int n){ if(n<3) return 1; else return (foo(n-1) + foo(n-3) + 1); } Let ‘m’ denote the number of invocations of function foo and ‘n’ denote the return value when the function is called as foo(foo(5)). What is the value of m - n ?
24aaaa23
asked
in
Algorithms
Oct 1, 2023
by
24aaaa23
250
views
algorithms
identify-function
normal
5
votes
2
answers
4
GATE CSE 2014 Set 2 | Question: 10 | Modified
Consider the function func shown below: int func(int num) { int count = 0; while (num) { count++; num>>= 1; } return (count); } The value returned by func(-435) is: 6 9 Will loop forever Depends on computer architecture
Souvik33
asked
in
Programming in C
Jan 15, 2023
by
Souvik33
1.1k
views
algorithms
identify-function
numerical-answers
easy
0
votes
1
answer
5
Algo
damz1499
asked
in
Algorithms
Nov 11, 2022
by
damz1499
281
views
algorithms
identify-function
1
vote
1
answer
6
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, 2022
by
admin
632
views
tifr2022
algorithms
identify-function
time-complexity
1
vote
3
answers
7
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 Bhaiya
asked
in
Programming in C
Aug 18, 2022
by
Lakshman Bhaiya
515
views
isi2020-pcb-cs
identify-function
descriptive
11
votes
4
answers
8
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
4.9k
views
gatecse-2021-set2
numerical-answers
algorithms
identify-function
output
1-mark
8
votes
4
answers
9
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
6.1k
views
gatecse-2021-set1
algorithms
numerical-answers
identify-function
2-marks
1
vote
2
answers
10
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
585
views
cmi2020-datascience
algorithms
recursion
identify-function
1
vote
1
answer
11
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
284
views
cmi2020-datascience
algorithms
identify-function
18
votes
4
answers
12
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
11.2k
views
gatecse-2020
numerical-answers
identify-function
2-marks
0
votes
0
answers
13
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 Bhaiya
asked
in
Algorithms
Feb 11, 2020
by
Lakshman Bhaiya
614
views
tifr2020
algorithms
identify-function
time-complexity
4
votes
3
answers
14
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 in C
Sep 13, 2019
by
gatecse
868
views
cmi2019
identify-function
1
vote
3
answers
15
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 in C
Sep 13, 2019
by
gatecse
594
views
cmi2019
identify-function
4
votes
3
answers
16
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 in C
Sep 13, 2019
by
gatecse
821
views
cmi2018
identify-function
13
votes
4
answers
17
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
Programming in C
Feb 7, 2019
by
Arjun
9.5k
views
gatecse-2019
programming-in-c
numerical-answers
identify-function
1-mark
23
votes
8
answers
18
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
16.4k
views
gatecse-2019
algorithms
identify-function
2-marks
0
votes
2
answers
19
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
1.0k
views
go-mockgate-1
numerical-answers
identify-function
recursion
algorithms
3
votes
1
answer
20
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
856
views
go-mockgate-1
numerical-answers
identify-function
algorithms
1
vote
1
answer
21
Test algo
Deepalitrapti
asked
in
Algorithms
Sep 20, 2018
by
Deepalitrapti
773
views
identify-function
output
test-series
0
votes
1
answer
22
#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
492
views
algorithms
usergate2014
usermod
identify-function
1
vote
2
answers
23
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
4.1k
views
isro2018
algorithms
identify-function
1
vote
1
answer
24
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
5.1k
views
isro2018
algorithms
identify-function
5
votes
2
answers
25
ISRO2018-72
Consider the following C code segment int f(int x) { if(x<1) return 1; else return (if(x-1)+g(x)); } int g(int x) { if(x<2) return 2; else return (if(x-1)+g(x/2)); } Of the following, which best describes the growth of $f(x)$ as a function of $x$ ? Linear Exponential Quadratic Cubic
Arjun
asked
in
Algorithms
Apr 22, 2018
by
Arjun
4.5k
views
isro2018
algorithms
identify-function
time-complexity
1
vote
0
answers
26
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 in C
Jun 14, 2017
by
Rameez Raza
607
views
identify-function
Page:
1
2
3
4
next »
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
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
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(24)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(682)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
243k
comments
79.6k
users
Recent questions tagged identify-function
Recent Blog Comments
Hlo I'm Rupesh I got AIR 3485 in gate CS and AIR...
@Ajay Sasank here is the direct link...
Thank you for the post didi My GATE 2023 & 2024...
I Hope it helps 😊
Today's best post I seen thank you for motivation