Login
Register
Dark Mode
Brightness
Ambient Glow – Questions list
Register
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged loop
5
5 votes
2
2 answers
304
304 views
GO Classes DPP | GATE CS | C Programming | Loop Control
What is the output of the following code?#include <stdio.h int main() { int a[5] = {2, 4, 1, 3, 5}; int i, sum = 0; for (i = 0; i < 5; i++) { if (a[i] % 2 == 0) sum = sum...
GO Classes
304
views
asked
Jun 5
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-289
programming-in-c
c-programming
goclasses-c-programming-practice-questions
array
loop
+
–
12
12 votes
1
1 answer
355
355 views
GO Classes DPP | GATE CS | C Programming | Nested Loops
What is the output of the following code?#include <stdio.h int main() { int i, j, sum = 0; for (i = 1; i <= 4; i++) { for (j = 1; j <= 4; j++) { if (j == i) continue; if ...
GO Classes
355
views
asked
Jun 3
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-288
programming-in-c
c-programming
goclasses-c-programming-practice-questions
loop
numerical-answers
+
–
12
12 votes
2
2 answers
428
428 views
GO Classes DPP | GATE CS | C Programming | Nested Loops
What is the output of the following code?#include <stdio.h int main() { int i, j, count = 0; for (i = 1; i <= 3; i++) { for (j = 1; j <= i; j++) { count = count + j; } } ...
GO Classes
428
views
asked
Jun 3
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-288
programming-in-c
c-programming
goclasses-c-programming-practice-questions
loop
numerical-answers
+
–
0
0 votes
2
2 answers
373
373 views
CMI Data Science 2025 | Part A | Question: 16
In the following code the operator $\textsf{%}$ denotes the remainder after integer division. That is: for positive integers $\textsf{a,b}$ the value $\textsf{a % b}$ is ...
Shubham Sharma 2
373
views
asked
Jun 20, 2025
Algorithms
cmi2025-datascience
programming
programming-in-c
loop
+
–
0
0 votes
1
1 answer
167
167 views
CMI 2023 | Data Science | Part B | Question: 14
In the following pseudocode segment, A denotes an array and len(A) denotes the number of elements in that array. The array is indexed from $1$ to len(A). Write down the a...
Ay_Kay_Ay
167
views
asked
Dec 2, 2024
Algorithms
cmi2023-datascience-part-b
array
loop
data-structures
programming-in-c
+
–
2
2 votes
1
1 answer
810
810 views
C programming Array & Loops
#include <stdio.h int main () { int i, k; int a [8] = {33,34,35,36,37,40,50,38}; for(i = 0; i < 3; i++) { a[i] = a[i] + 1; i=i+1; } i=i-1; for (k = 7; k 4; k ) { int i =...
shivamSK
810
views
asked
Jun 15, 2024
Programming in C
programming-in-c
programming
array
loop
loop-invariants
+
–
0
0 votes
1
answers
1 answer
1.0k
1.0k views
Made Easy Test Series 2024
How many times is the comparison $i >= n$ performed in the following program?int i = 200 n = 80; main() { while (i >= n) { i = i - 2 n = n + 1 } }
aashish1406
1.0k
views
asked
Aug 9, 2023
Algorithms
algorithms
algorithm-design
loop-invariants
loop
time-complexity
+
–
1
1 vote
2
answers
2 answers
971
971 views
Loops (while and for)
In the picture below:Can anyone explain to me why ‘while’ loop starting from 2 but in the case of ‘for’ loop it is starting from 1 (although i++ is available for both in ...
gopal_gate
971
views
asked
Jul 29, 2023
Programming in C
programming
loop
+
–
0
0 votes
1
1 answer
418
418 views
UGCNET CSE December 2022: 78
In what sequence the initialization, testing and execution of body is done while using do-while loop?CommentingExecution of the bodyInitialisationTesting the conditionCho...
admin
418
views
asked
May 20, 2023
Programming in C
ugcnetcse-dec2022
programming-in-c
loop
+
–
0
0 votes
1
1 answer
718
718 views
TestBook TestSeries Finding number of records under join of 2 tables
Assume a relation ‘R’ having 200 records. These records are stored in blocks having block factor as 20. Consider another relation ‘S’ having 120 records and all these rec...
Sahil_Lather
718
views
asked
Jan 29, 2023
Databases
databases
algorithms
loop
testbook-test-series
+
–
0
0 votes
1
1 answer
1.0k
1.0k views
Unacacdemy AIMT 2
can anyone explain how the for loop works here..?
TusharKumar
1.0k
views
asked
Dec 22, 2022
Programming in C
programming-in-c
output
loop
+
–
0
0 votes
0
0 answers
616
616 views
University Assignment
𝑙𝑜𝑜𝑝:1. 𝐴𝐷𝐷𝐼 𝑅2, 𝑅2, #12. 𝐿𝐷 𝑅4, 0(𝑅3)3. 𝐿𝐷 𝑅5, 4(𝑅3)4. 𝐴𝐷𝐷 𝑅6, 𝑅4, 𝑅55. 𝑀𝑈𝐿 𝑅4, 𝑅6, 𝑅76. 𝑆𝑈𝐵𝐼 𝑅3, 𝑅3, #87. 𝐵𝑁𝐸𝑍 𝑅2, 𝑙𝑜𝑜𝑝8. 𝐴𝐷𝐷 𝑅11, 𝑅12, 𝑅13Question: Assume a 5-stage pi...
lalitver10
616
views
asked
Nov 14, 2022
CO & Architecture
pipelining
co-and-architecture
loop
+
–
0
0 votes
0
0 answers
972
972 views
Trishna's GATE CSE
In a programmed I/O technique, the processor is stuckin a wait loop doing status checking of an I/O device.To increase efficiency, the I/O software could be writ-ten so t...
eskaykaushik
972
views
asked
Oct 18, 2022
Computer Networks
operating-system
input-output
loop
+
–
0
0 votes
2
answers
2 answers
1.1k
1.1k views
made easy gate cs question bank
What will be the output printed for find(4)? void find(int x) { static int i = 10, y = 0; y = y + i; for(i; i>0; i = i - 10) { if(x! = 0) find(x – 1); else printf(“%d”, y...
rohitkaushal1
1.1k
views
asked
Sep 22, 2022
Programming in C
algorithms
programming-in-c
loop
+
–
Page:
1
2
next »