Time Left - 12:00 mins

GATE CS 2019 : Prog & DS Rapid Quiz -2

Attempt now to get your rank among 842 students!

Question 1

Assuming that a pointer take 4 bytes and the size of an integer is 2 bytes. What is the size of the *a in declaration: int (*a) [10][2] ?

Question 2

Consider the following C program:
int main(){
printf("Hello %%");
return 0;

What does the code print?

Question 3

Consider the following C function:
void fun(int a, int b, int c)
{

              a= b == c;
              printf(“%d”,a);
}
If a = 0, b = 3, c = 3 is passed to the function what will be the output?

Question 4

Consider the following C program:

The integer a can only take two values 0 and 1, the above statement is similar to?

Question 5

Initially a priority queue had 5 elements and it is being implemented as Max-Heap. Let’s say the level order traversal of the heap is: 30, 18, 17, 12, 11. Now two more elements are inserted into the heap i.e. 10 and 19 in the same order. The level order traversal of the heap after the insertion is:

Question 6

Consider a program which stores the frequency of marks of student in a particular subject say Mathematics. The marks is in the range [0...100] and there are around 500 students. But there is one condition we only want to record frequency if the student has passed in the exam, the passing marks being 40. What is the best way to store the frequency of marks above 40?
  • 842 attempts
  • 8 upvotes
  • 5 comments
Mar 27GATE & PSU CS