Posts

Showing posts from February, 2026

Lab

 Bhai tension mat le 😎 Main tujhe Lab-3 ka pura ready-to-write material de raha hoon — tu bas copy karega, samjhega aur practical me likh dega. Main sab programs simple C, array-based stack/queue, singly linked list me de raha hoon. --- 🔥 1️⃣ Evaluate Postfix Expression Using Stack #include <stdio.h> #include <ctype.h> int stack[100], top = -1; void push(int x) {     stack[++top] = x; } int pop() {     return stack[top--]; } int main() {     char exp[100];     int i, a, b;     printf("Enter postfix expression: ");     scanf("%s", exp);     for(i = 0; exp[i] != '\0'; i++) {         if(isdigit(exp[i])) {             push(exp[i] - '0');         }         else {             b = pop();             a = pop();             switch(...