## Data Structures | Queue | Question 11

Suppose a circular queue of capacity (n – 1) elements is implemented with an array of n elements. Assume that the insertion and deletion operation… Read More »

## Algorithms | Analysis of Algorithms | Question 3

The recurrence relation capturing the optimal time of the Tower of Hanoi problem with n discs is. (GATE CS 2012) (A) T(n) = 2T(n –… Read More »

## Data Structures | Graph | Question 1

Which of the following is an advantage of adjacency list representation over adjacency matrix representation of a graph? (A) In adjacency list representation, space is… Read More »

## C | Functions | Question 4

filter_none edit close play_arrow link brightness_4 code #include <stdio.h> int main() {   printf(“%d”, main);     return 0; } chevron_right filter_none (A) Address of main function (B)… Read More »

## C | Loops & Control Structure | Question 10

filter_none edit close play_arrow link brightness_4 code # include <stdio.h> int main() {    int i = 0;    for (i=0; i<20; i++)    {      switch(i)      {        case… Read More »

## C | Macro & Preprocessor | Question 8

filter_none edit close play_arrow link brightness_4 code #include <stdio.h> #define a 10 int main() {   printf(“%d “,a);      #define a 50      printf(“%d “,a);   return… Read More »

## Algorithms | Analysis of Algorithms | Question 2

What is the time complexity of fun()? filter_none edit close play_arrow link brightness_4 code int fun(int n) {   int count = 0;   for (int i… Read More »

## C | Loops & Control Structure | Question 9

Output? filter_none edit close play_arrow link brightness_4 code #include <stdio.h> int main() {     int c = 5, no = 10;     do {         no /= c;… Read More »

## C | Loops & Control Structure | Question 8

filter_none edit close play_arrow link brightness_4 code #include<stdio.h> int main() {    int n;    for (n = 9; n!=0; n–)      printf(“n = %d”, n–);    return 0;… Read More »

## C | Macro & Preprocessor | Question 7

Output? filter_none edit close play_arrow link brightness_4 code # include <stdio.h> # define scanf  “%s Geeks Quiz ” int main() {    printf(scanf, scanf);    return 0;… Read More »

## C | Macro & Preprocessor | Question 6

filter_none edit close play_arrow link brightness_4 code #include <stdio.h> #define square(x) x*x int main() {   int x;   x = 36/square(6);   printf(“%d”, x);   return 0; }… Read More »

## Data Structures | Queue | Question 6

Which of the following is true about linked list implementation of queue? (A) In push operation, if new nodes are inserted at the beginning of… Read More »

## Data Structures | Stack | Question 3

Which of the following is true about linked list implementation of stack? (A) In push operation, if new nodes are inserted at the beginning of… Read More »

## C | Macro & Preprocessor | Question 5

filter_none edit close play_arrow link brightness_4 code #include <stdio.h> #define ISEQUAL(X, Y) X == Y int main() {     #if ISEQUAL(X, 0)         printf(“Geeks”);     #else         printf(“Quiz”);     #endif… Read More »

## C | String | Question 6

filter_none edit close play_arrow link brightness_4 code #include<stdio.h> int main() {     char str[] = “GeeksQuiz”;     printf(“%s %s %s\n”, &str[5], &5[str], str+5);     printf(“%c %c %c\n”, *(str+6),… Read More »