Write a C program to simulate the Hot Potato game using a queue and find the winning person’s position.
Two space-separated integers: n (number of people) and k (passes count).
Print the winner's 1-indexed position.
1 <= n <= 30, 1 <= k <= 10
7 3
4
Enqueue n people into a queue. Rotate the queue k times, dequeue the eliminated person, and repeat until one person remains.
#include <stdio.h>
#include <stdlib.h>
int main() {
int n, k;
if (scanf("%d %d", &n, &k) == 2) {
// Write your code here to simulate Hot Potato game using queue
}
return 0;
}Embedded systems rely on efficient low-level programming to interact directly with hardware. In this course, you will learn how to write practical Embedded C programs used in real microcontroller-based systems. Rather than focusing only on theory, this course follows a practice-driven approach. Each lesson includes hands-on coding exercises that simulate real firmware development tasks used