Posts

Showing posts from February, 2022

Cadence (DevOps Compiler)

     1) What is Memory heirarchy ? Types of Cache memory    2) What is Amdhall's law?    3) Please write a program to delete a single node in a BST    4) Given some sets of points , how to draw convex hull     5) How to send Crtl+Z to different terminal/process   kill(pid, SIGSTOP)

Motorola(Dynamic Technologies) Kolkata

 #include <stdio.h> #define MAX_SIZE 30 int stack[30]; static int size; int push(int a) {    if(size >= MAX_SIZE)    {        printf("overflow\n");        return 0;    }   else {       stack[size++] = a;       return 1;   } } int pop() {     if(size < 0)     {         printf("underflow\n");         return -1;     }     else {          return stack[size--];     } } int main() {     char *c = "(((5+7)*6)/2)";     while(*c != '\0')     {          switch(*c)          {              case '1':              case '2':case '3':case '4':case '5':case '6': case '7':case '8':case '9':case '0':case '+':case '-':cas...