Skip to content

Category Archives: Quizzes

#include <stdio.h> #define square(x) x*x int main() {   int x;   x = 36/square(6);   printf("%d", x);   return 0; } (A) 1 (B) 36 (C) 0 (D)… Read More
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
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
#include <stdio.h> #define ISEQUAL(X, Y) X == Y int main() {     #if ISEQUAL(X, 0)         printf("Geeks");     #else         printf("Quiz");     #endif     return 0; } Output of the above… Read More
#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), str[6], 6[str]);     return 0; } (A) Runtime… Read More
What does the following fragment of C-program print? char c[] = "GATE2011";  char *p =c;  printf("%s", p + p[3] - p[1]) ; (A) GATE2011 (B)… Read More
int f(int x, int *py, int **ppz)  {    int y, z;    **ppz += 1;     z  = **ppz;    *py += 2;     y = *py;     x +=… Read More
Consider this C code to swap two integers and these five statements after it: void swap(int *px, int *py)  {     *px = *px - *py; … Read More
#include<stdio.h>  void f(int *p, int *q)  {    p = q;    *p = 2;  }  int i = 0, j = 1;  int main()  {    f(&i,… Read More
The reason for using pointers in a Cprogram is (A) Pointers allow different functions to share and modify their local variables. (B) To pass large… Read More
#include<stdio.h> void fun(int arr[]) {   int i;   int arr_size = sizeof(arr)/sizeof(arr[0]);   for (i = 0; i < arr_size; i++)       printf("%d ", arr[i]); }    int… Read More
Predict the output? #include <stdio.h> int fun(char *str1) {   char *str2 = str1;   while(*++str1);   return (str1-str2); }    int main() {   char *str = "GeeksQuiz";… Read More
Assume sizeof an integer and a pointer is 4 byte. Output? #include <stdio.h>    #define R 10 #define C 20    int main() {    int… Read More
What is the output of following program? #include <stdio.h>    int main() {    int a = 1;    int b = 1;    int c = a… Read More
What is the worst case time complexity of following implementation of subset sum problem. // Returns true if there is a subset of set[] with… Read More

Start Your Coding Journey Now!