Skip to content
All Easy Articles
Following questions have been asked in GATE CS exam. 1.Assume the following C variable declaration int *A [10], B[10][10]; Of the following expressions I A[2]… Read More
Following questions have been asked in GATE CS exam. 1. Consider the following C program segment c struct CellNode {   struct CelINode *leftchild;   int element;   struct… Read More
Compute n modulo d without division(/) and modulo(%) operators, where d is a power of 2 number. Let ith bit from right is set in d.… Read More
  Write a function rotate(arr[], d, n) that rotates arr[] of size n by d elements. Example :  Input : arr[] = [1, 2, 3, 4,… Read More
  Write a function rotate(ar[], d, n) that rotates arr[] of size n by d elements.   Rotation of the above array by 2 will make… Read More
Write a function rotate(ar[], d, n) that rotates arr[] of size n by d elements.  Rotation of the above array by 2 will make array… Read More
Level order traversal of a tree is breadth first traversal for the tree.  Level order traversal of the above tree is 1 2 3 4… Read More
Bit Rotation: A rotation (or circular shift) is an operation similar to shift except that the bits that fall off at one end are put… Read More
Following questions have been asked in GATE CS exam. 1. Consider the function f defined below. struct item  {    int data;    struct item * next; … Read More
  There are two singly linked lists in a system. By some programming error, the end node of one of the linked list got linked… Read More
Following questions have been asked in GATE CS exam. 1. Which of the following derivations does a top-down parser use while parsing an input string?… Read More
Following questions have been asked in GATE CS exam. 1. Consider the following three C functions : [PI] int * g (void)  {    int x… Read More
Following questions have been asked in GATE CS exam. 1. Suppose the time to service a page fault is on the average 10 milliseconds, while… Read More
Following questions have been asked in GATE CS exam. 1. Consider a machine with 64 MB physical memory and a 32-bit virtual address space. If… Read More
Given a string, find the first non-repeating character in it. For example, if the input string is “GeeksforGeeks”, then the output should be ‘f’ and… Read More
Predict the output of below programs Question 1 int main() {     int i = 0;     while (i <= 4)     {        printf("%d", i);        if (i >… Read More
Following questions have been asked in GATE CS exam. 1. Which of the following is NOT a valid deadlock prevention scheme? (GATE CS 2000) (a)… Read More
There are two sorted arrays. First one is of size m+n containing only m elements. Another one is of size n and contains n elements.… Read More
Well, we assume that you know what does it mean by pointer in C. So how do we create a pointer to an integer in… Read More
Asked by Tanuj Here is the standard prototype of printf function in C. int printf(const char *format, ...); The format string is composed of zero… Read More