Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged goclasses_wq4
5
votes
1
answer
1
GO Classes 2023 | Weekly Quiz 4 | Question: 2
Which of the following expressions will evaluate to true? INT_MIN is the minimum signed integer in the system which is using 2's complement representation for signed integers and variables are defined as follows: int x = 5, i = -7; ((x >> 2) << 2) <= x ~ 1&& 1 INT_MIN == -INT_MIN -10 < i <-1
Which of the following expressions will evaluate to true?INT_MIN is the minimum signed integer in the system which is using 2's complement representation for signed integ...
GO Classes
794
views
GO Classes
asked
Mar 26, 2022
Programming in C
goclasses_wq4
goclasses
programming
programming-in-c
number-representation
multiple-selects
2-marks
+
–
6
votes
4
answers
2
GO Classes 2023 | Weekly Quiz 4 | Question: 10
int find(int n) { int i, j, k, a = 1; for (i = 1; i <= n; i++) for (j = 1; j <= i; j++) for (k = 1; k <= j; k++) a = a + 1; return a; } What will be the value of find$(10)$?
int find(int n) { int i, j, k, a = 1; for (i = 1; i <= n; i++) for (j = 1; j <= i; j++) for (k = 1; k <= j; k++) a = a + 1; return a; }What will be the value of find$(10)...
GO Classes
724
views
GO Classes
asked
Mar 26, 2022
Programming in C
goclasses_wq4
numerical-answers
programming
programming-in-c
loop
goclasses
2-marks
+
–
2
votes
3
answers
3
GO Classes 2023 | Weekly Quiz 4 | Question: 17
How many times is foo activated (called), including the first "$\text{foo}(3,12)$" $\text{max()}$ and $\text{min()}$ are functions that return maximum and minimum respectively. int foo(int a, int b) { if (a==b) { return b; } int mn =min(a,b), mx =max(a,b); return foo(mn,mn) + foo( mx - mn , mn); }
How many times is foo activated (called), including the first "$\text{foo}(3,12)$"$\text{max()}$ and $\text{min()}$ are functions that return maximum and minimum respecti...
GO Classes
545
views
GO Classes
asked
Mar 26, 2022
Programming in C
goclasses_wq4
numerical-answers
goclasses
programming
programming-in-c
recursion
2-marks
+
–
5
votes
3
answers
4
GO Classes 2023 | Weekly Quiz 4 | Question: 20
What will be output printed by $\text{mystery}2(6)$? void mystery2(int n) { if (n > 0) { printf("%d", n); mystery2(n-2); mystery2(n-3); printf("%d", n); } }
What will be output printed by $\text{mystery}2(6)$?void mystery2(int n) { if (n 0) { printf("%d", n); mystery2(n-2); mystery2(n-3); printf("%d", n); } }
GO Classes
528
views
GO Classes
asked
Mar 26, 2022
Programming in C
goclasses_wq4
goclasses
programming
programming-in-c
recursion
numerical-answers
1-mark
+
–
4
votes
3
answers
5
GO Classes 2023 | Weekly Quiz 4 | Question: 21
What will be the output printed by $\text{mystery}3(6)$? void mystery3(int n) { if (n == 0 || n == 1) return; mystery3(n-2); printf("%d", n); mystery3(n-1); }
What will be the output printed by $\text{mystery}3(6)$?void mystery3(int n) { if (n == 0 || n == 1) return; mystery3(n-2); printf("%d", n); mystery3(n-1); }
GO Classes
584
views
GO Classes
asked
Mar 26, 2022
Programming in C
goclasses_wq4
goclasses
programming
programming-in-c
recursion
numerical-answers
1-mark
+
–
5
votes
3
answers
6
GO Classes 2023 | Weekly Quiz 4 | Question: 22
Consider the following pair of mutually recursive functions. What does $g(g(2))$ evaluate to? int f(int n){ if (n==0) return 0; return f(n-1)+g(n-1); } int g(int n){ if (n==0) return 1; return g(n-1) + f(n); }
Consider the following pair of mutually recursive functions. What does $g(g(2))$ evaluate to?int f(int n){ if (n==0) return 0; return f(n-1)+g(n-1); } int g(int n){ if (n...
GO Classes
880
views
GO Classes
asked
Mar 26, 2022
Programming in C
goclasses_wq4
goclasses
programming
programming-in-c
recursion
numerical-answers
2-marks
+
–
9
votes
2
answers
7
GO Classes 2023 | Weekly Quiz 4 | Question: 23
Consider the following recursive function. What is $f(0)?$ int f(int x) { if (x > 1000) return x - 4; else return f(f(x+5)); }
Consider the following recursive function. What is $f(0)?$int f(int x) { if (x 1000) return x - 4; else return f(f(x+5)); }
GO Classes
637
views
GO Classes
asked
Mar 26, 2022
Programming in C
goclasses_wq4
goclasses
programming
programming-in-c
recursion
numerical-answers
2-marks
+
–
To see more, click for the
full list of questions
or
popular tags
.
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register