Company: Qualcomm
Difficulty: medium
What will be the position of TOP when there is only one element in the stack? N-1 1 0 -1 What will be the output of the program given below? #include <stdio.h> int soft[5] = {6, 8, 10, 13, 16}; int main() { int soft[5] = {12, 14, 15, 18, 20}; char *ptr = (char*)soft; *ptr++; *++ptr; printf("%d ", *ptr-- && 2); ++*ptr; ptr += 2; printf("%d %d ", *++ptr, *(soft + 2 + 2 / 2)); ptr += 2 || 1; *ptr++; *ptr = 3; printf("%d %d ", *ptr--, ++*ptr); return 0; } 1 18 20 5 6 18 0 12 13 16 1 15 18 5 5 0 14 18 4 4 Which mechanism prevents deadlock when multiple tasks require shared resources? Cache invalidation Busy waiting Priority aging Priority inheritance protocol Which of the given options is true about the singly linked list? No node can be inserted in the middle of the singly linked list. Using singly linked list, trees and graphs cannot be created. The address of the first node is always stored in a reference node of the previous node. The reference part of the last node in the