# Category Archives: Quizzes

What is recurrence for worst case of QuickSort and what is the time complexity in Worst case? (A) Recurrence is T(n) = T(n-2) + O(n)… Read More
Consider the following code. The function myStrcat concatenates two strings. It appends all characters of b to end of a. So the expected output is… Read More
What is the value of following recurrence. T(n) = 5T(n/5) + , T(1) = 1, T(0) = 0 (A) Theta (n) (B) Theta (n^2) (C)… Read More
What is the value of following recurrence. T(n) = T(n/4) + T(n/2) + cn2 T(1) = c T(0) = 0 Where c is a positive… Read More
What is the output of following program?  C #include <stdio.h>   void print(int n, int j) {     if (j >= n)         return;     if (n -… Read More
#include <stdio.h> int main() {     //Assume sizeof character is 1 byte and sizeof integer is 4 bytes     printf("%d", sizeof(printf("GeeksQuiz")));     return 0; } (A) GeeksQuiz4 (B)… Read More
#include <stdio.h> int main() {     int i = 5, j = 10, k = 15;     printf("%d ", sizeof(k /= i + j));     printf("%d", k);     return… Read More
C #include <stdio.h>   int i;   int main() {     if (i) {         // Do nothing     } else {         printf("Else");     }     return 0; } What… Read More
C #include <stdio.h>   int main() {     int i;     if (printf("0"))         i = 3;     else         i = 5;     printf("%d", i);     return 0; } Predict the… Read More
What is the output of below program? #include <stdio.h> int foo(int* a, int* b) {     int sum = *a + *b;     *b = *a;     return… Read More
C #include <stdio.h> int main() {     int i = 3;     printf(\"%d\", (++i)++);     return 0; } What is the output of the above program?  (A) 3 … Read More
Predict the output of the below program:  C #include <stdio.h>   #define EVEN 0 #define ODD 1   int main() {     int i = 3;… Read More
C #include <stdio.h>   int main() {     int i = 3;     switch (i) {         case 1:             printf("Geeks");             break;         case 1+2:             printf("Quiz");             break;         default:             printf("GeeksQuiz");     }… Read More
What is the output of the below program?  C #include <stdio.h>   int main() {     int i = 2;     switch (i) {         case 0:             printf("Geeks");… Read More
C #include <stdio.h> #define PRINT(i, limit) do \\                         { \\                             if (i++ < limit) \\                             { \\                                 printf(\"GeeksQuiz\\n\"); \\                                 continue; \\                             } \\                         }while(0);  … Read More