All Easy Articles

## C | Macro & Preprocessor | Question 5 2

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 2

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 »

## C | Pointer Basics | Question 13 2.3

filter_none edit close play_arrow link brightness_4 code int f(int x, int *py, int **ppz)  {    int y, z;    **ppz += 1;     z  = **ppz;    *py… Read More »

## C | Pointer Basics | Question 12 2.7

Consider this C code to swap two integers and these five statements after it: filter_none edit close play_arrow link brightness_4 code void swap(int *px, int… Read More »

## C | Pointer Basics | Question 17 2

filter_none edit close play_arrow link brightness_4 code #include<stdio.h> void fun(int arr[]) {   int i;   int arr_size = sizeof(arr)/sizeof(arr[0]);   for (i = 0; i < arr_size;… Read More »

## C | Advanced Pointer | Question 2 2.2

Assume sizeof an integer and a pointer is 4 byte. Output? filter_none edit close play_arrow link brightness_4 code #include <stdio.h>    #define R 10 #define… Read More »

## C | Operators | Question 10 2.2

What is the output of following program? filter_none edit close play_arrow link brightness_4 code #include <stdio.h>    int main() {    int a = 1;    int… Read More »

## C | Advanced Pointer | Question 1 2.3

filter_none edit close play_arrow link brightness_4 code void fun(int *p)  {    int q = 10;    p = &q;  }           int main()  {    int r… Read More »

## C | Pointer Basics | Question 8 2

filter_none edit close play_arrow link brightness_4 code int main() {  char *ptr = “GeeksQuiz”;  printf(“%c\n”, *&*&*ptr);  return 0; } chevron_right filter_none (A) Compiler Error (B)… Read More »

## C | Operators | Question 9 2.2

Output of following program? filter_none edit close play_arrow link brightness_4 code #include <stdio.h> int f1() { printf (“Geeks”); return 1;} int f2() { printf (“Quiz”);… Read More »

## Data Structures | Linked List | Question 5 2.5

The following function reverse() is supposed to reverse a singly linked list. There is one line missing at the end of the function. filter_none edit… Read More »

## How to measure time taken by a function in C? 2

To calculate time taken by a process, we can use clock() function which is available time.h. We can call the clock function at the beginning… Read More »

## Microsoft Interview | 14 2

My name is Ravi Chandra. Today I have attended Microsoft interview in Bangalore. I was referred by a consultant. Interviews were conducted for various positions… Read More »

## C | Operators | Question 8 2.2

filter_none edit close play_arrow link brightness_4 code #include <stdio.h> int main() {     //Assume sizeof character is 1 byte and sizeof integer is 4 bytes     printf(“%d”,… Read More »

## Data Structures | Binary Trees | Question 15 2

In a complete k-ary tree, every internal node has exactly k children or no child. The number of leaves in such a tree with n… Read More »

## C | Operators | Question 6 2

What is the output of below program? filter_none edit close play_arrow link brightness_4 code #include <stdio.h> int foo(int* a, int* b) {     int sum =… Read More »

## C | Loops & Control Structure | Question 5 2.6

Predict the output of the below program: filter_none edit close play_arrow link brightness_4 code #include <stdio.h> #define EVEN 0 #define ODD 1 int main() {… Read More »

## C | Loops & Control Structure | Question 2 2.6

filter_none edit close play_arrow link brightness_4 code #include <stdio.h> #define PRINT(i, limit) do \                         { \                             if (i++ < limit) \                             { \                                 printf(“GeeksQuiz\n”); \… Read More »

## C | Input and Output | Question 6 2.5

Predict the output of below program: filter_none edit close play_arrow link brightness_4 code #include <stdio.h> int main() {     printf(“%c “, “GeeksQuiz”[5]);     return 0; } chevron_right… Read More »

## C | Loops & Control Structure | Question 1 2.6

filter_none edit close play_arrow link brightness_4 code #include <stdio.h>    int main() {     int i = 1024;     for (; i; i >>= 1)         printf(“GeeksQuiz”);     return… Read More »