Write a C program to initialize a Double-Ended Queue (Deque) with a given capacity and print its initial state.
An integer capacity value.
Print the initialized capacity and initial front/rear pointers.
1 <= capacity <= 100
5
Capacity: 5, Front: -1, Rear: -1
Initialize deque capacity with front = -1 and rear = -1 to represent an empty deque.
#include <stdio.h>
#include <stdlib.h>
struct Deque {
int *arr;
int capacity;
int front;
int rear;
};
int main() {
int cap;
if (scanf("%d", &cap) == 1) {
// Write your code here to create deque
}
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