Skip to content
Gblog Must Do Coding Questions for Product Based Companies
As the placement season is back, GeeksforGeeks is here to help you crack the interview. We have selected some most commonly asked and MUST DO… Read More
Pick the best statement for the below program: #include "stdio.h"    int main() {  union {int i1; int i2;} myVar = {.i2 =100};  printf("%d %d",myVar.i1,… Read More
Pick the best statement for the below program: #include "stdio.h"    int main() {  struct {int i; char c;} myVar = {.c ='A',.i = 100};… Read More
Pick the best statement for the below program: #include "stdio.h"    int main() {  struct {int a[2], b;} arr[] = {[0].a = {1}, [1].a =… Read More
Pick the best statement for the below program snippet: struct {int a[2];} arr[] = {1,2}; (A) No compile error and it’ll create array arr of… Read More
Pick the best statement for the below program: #include "stdio.h"    int main() {  struct {int a[2];} arr[] = {{1},{2}};     printf("%d %d %d %d",arr[0].a[0],arr[0].a[1],arr[1].a[0],arr[1].a[1]);… Read More
Recently Microsoft visited our campus for IDC internship program and following is my interview experience. Online MCQ Round: It consist of 15 MCQ Questions on… Read More
Pick the best statement for the below program: #include "stdio.h"    int size = 4; int arr[size];    int main() {  if(arr[0])   printf("Initialized to ZERO");… Read More
Pick the best statement for the below program: #include "stdio.h"     void fun(int n) {    int idx;    int arr1[n] = {0};    int arr2[n];        for… Read More
Pick the best statement for the below: int arr[50] = {0,1,2,[47]=47,48,49}; (A) This isn’t allowed in C and it’ll give compile error (B) This is… Read More
Pick the best statement for the following program snippet: #include "stdio.h" void foo(void) {  static int staticVar;  staticVar++;  printf("foo: %d\n",staticVar); }    void bar(void) {… Read More
Pick the best statement for the following program snippet: #include <stdio.h>    int main() {  int var;  /*Suppose address of var is 2000 */   … Read More
Given three numbers x, y and p, compute (xy) % p.  Examples :  Input: x = 2, y = 3, p = 5 Output: 3… Read More
Given a number as string, remove recurring digits from the given string. The changes must be made in-place. Expected time complexity O(n) and auxiliary space… Read More
Given a set of positive integer elements, find the count of subsets with GCDs equal to given numbers.Examples:  Input: arr[] = {2, 3, 4}, gcd[]… Read More
Interview 1 (45 mins) Q1) write a function that returns a different string every time it is called. Answer just return the time in the form of a… Read More

Start Your Coding Journey Now!