Skip to content
Gblog Master the Coding Interview – Contest Series Based On Real Interviews
“If you want to clear your next Coding Interview, practice as many programming questions as you can!” – An obvious advice that a guy who’s… Read More
The stock span problem is a financial problem where we have a series of n daily price quotes for a stock and we need to… Read More
Which one of the following is an application of Stack Data Structure? (A) Managing function calls (B) The stock span problem (C) Arithmetic expression evaluation… Read More
Following is C like pseudo code of a function that takes a Queue as an argument, and uses a stack S to do processing. void… Read More
Following is C like pseudo code of a function that takes a number as an argument, and uses a stack S to do processing. void… Read More
Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[], char txt[]) that prints all occurrences of pat[] in txt[]. You may… Read More
A complete binary tree is a binary tree where each level ‘l’ except the last has 2^l nodes and the nodes at the last level… Read More
What does the following function do for a given Linked List with first node as head? void fun1(struct node* head) { if(head == NULL) return;… Read More
#include <stdio.h> int main() {     int i;        i = 1, 2, 3;     printf("%d", i);          return 0; } (A)… Read More
#include <stdio.h> int main() {     int i = (1, 2, 3);          printf("%d", i);          return 0; } (A) 1… Read More
#include <stdio.h> int main() {     int i = 1, 2, 3;          printf("%d", i);          return 0; } (A) 1… Read More
Which of the followings is/are automatically added to every class, if we do not write our own. (A) Copy Constructor (B) Assignment Operator (C) A… Read More
#include "stdio.h" int main() { int x, y = 5, z = 5; x = y == z; printf("%d", x); getchar(); return 0; } (A)… Read More
#include <stdio.h>    int main()  {    printf(" \"GEEKS %% FOR %% GEEKS\"");    getchar();    return 0;  } (A) “GEEKS % FOR % GEEKS” (B) GEEKS %… Read More
Predict output of the following program #include <stdio.h> int main() {    printf("\new_c_question\by");    printf("\rgeeksforgeeks");     getchar();    return 0; } (A) ew_c_question geeksforgeeks (B) new_c_ques geeksforgeeks (C) geeksforgeeks… Read More
Predict the output of following program? #include "stdio.h" int main() {     char arr[100];     printf("%d", scanf("%s", arr));     /* Suppose that input value given         for above scanf… Read More