Gate 2025 | Question on GCD | Question on Do While Loop | What is the output?
Автор: Jaya Krishna
Загружено: 21 апр. 2025 г.
Просмотров: 257 просмотров
For full video explanation: • 123| GATE CSE 2025| Question on Do Wh...
What is the output of the following code:
int main() {
int x=126,y=105;
do{
if(x greater than y)
x=x-y;
else
y=y-x;
}while(x!=y);
printf("%d",x);
return 0;
}
Welcome to another GATE CSE 2025 problem-solving session! 🚀 In this video, we analyze a C programming question on the Do-While loop, where we compute the GCD (Greatest Common Divisor) of two numbers using the given code snippet. Loops and number theory-based logic are frequently tested in the GATE Computer Science exam, making this an essential concept to master.
🔹 What You’ll Learn in This Video?
✅ How the Do-While loop works in C
✅ Understanding step-by-step execution of the Euclidean algorithm
✅ Dry run of the given code snippet and deriving the output
✅ Common mistakes and important takeaways for GATE
🔹 Why Watch This?
📌 Important concept for GATE CSE 2025 exam
📌 Strengthen your C programming, loops, and algorithmic thinking
📌 Perfect for GATE aspirants & coding enthusiasts
🔔 Subscribe for more GATE 2025 content: [Your Channel Link]
👍 Like & Share this video with fellow GATE aspirants!
📩 Have doubts? Drop a comment below, and let’s discuss!
Don't forget to subscribe to our channel for more questions and updates! 🎨💻🌐
#GATE2025 #GATECSE #CProgramming #DoWhileLoop #GCD #GreatestCommonDivisor #GATEPreparation #GATECS #GATEQuestions #CodingForGATE #ComputerScience #jk #jayakrishna #gateplaylist #jkeducation #placementpreparation #ugcnet #cprogramming #gatecprogramming #cprogramming #ugcnet

Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: