Explain heap and queue.
Answer / Nitin Jeet Kumar
Heap is a data structure used to store a collection of elements with a priority, typically implemented as a binary tree. In a max-heap, the root element always has the highest priority, while in a min-heap, the root element always has the lowest priority. Queues are linear data structures that follow the FIFO (First-In-First-Out) principle, meaning that elements are removed from the front of the queue and added to the back. Queues can be implemented using arrays or linked lists.
| Is This Answer Correct ? | 0 Yes | 0 No |
In which mode we open the file for read,write and append also in c ? a)W b)w+ c)r+ d)a
How do I use strcmp?
Expand the following LKB BKL FFG
What is type qualifiers?
Compare interpreters and compilers.
how can u print a message without using any library function in c
Can we declare function inside main?
Explain how can a program be made to print the name of a source file where an error occurs?
#include<stdio.h> main() { int a[3]; int *I; a[0]=100;a[1]=200;a[2]=300; I=a; Printf(“%d\n”, ++*I); Printf(“%d\n”, *++I); Printf(“%d\n”, (*I)--); Printf(“%d\n”, *I); } what is the o/p a. 101,200,200,199 b. 200,201,201,100 c. 101,200,199,199 d. 200,300,200,100
A.C func() { pritnf(" in fuction %d",MACRO); } MAIN.c testfunc() { #define MACRO 10 printf("in test function %d", MACRO); } main() { printf("in main %d",MACRO); func(); testfunc(); getch(); }
What is getch() function?
What does double pointer mean in c?