Knowledge Buildings & C Programming – GATE CSE Earlier 12 months Questions


Fixing GATE Earlier 12 months’s Questions (PYQs) not solely clears the ideas but in addition helps to achieve flexibility, velocity, accuracy, and understanding of the extent of questions usually requested within the GATE examination, and that ultimately lets you achieve good marks within the examination. Earlier 12 months Questions assist a candidate follow and revise for GATE, which helps crack GATE with a superb rating. 

Knowledge Buildings & C Programming Earlier 12 months GATE Questions assist in analyzing the query sample of a topic and marking scheme in addition to it helps in time administration which general will increase the rating within the GATE examination. With common follow of PYQs, candidates can simply crack GATE with a superb GATE Rating.

Earlier than 2006, questions requested in GATE had been primarily theoretical, however lately, the questions requested had been multiple-choice questions with a single appropriate choice or a number of appropriate choices. We want to present the multiple-choice questions which are requested in GATE.

Knowledge Buildings & C Programming GATE Earlier 12 months Questions

On this article, we’re primarily specializing in the Knowledge Buildings & C Programming GATE Questions which are requested in Earlier Years with their options, and the place a proof is required, we have now additionally offered the rationale.

In Knowledge Buildings, we are going to cope with the next ideas. We’ve got additionally offered GATE Earlier 12 months’s Questions on these matters. Right here is the checklist of these matters together with their hyperlinks.

In C Programming, we are going to cope with the next ideas:

  • Arithmetic Operations
  • Conditional Assertion
  • Loops
  • Array and Pointer
  • Features

Under talked about are the hyperlinks to the C Programming PYQ’s pages. On every web page, you’re going to get the questions requested in C Programming together with the years requested.

Additionally, right here we’re going to focus on some fundamental PYQs associated to Knowledge Buildings & C Programming.

1. The preorder traversal of a binary search tree is 15, 10, 12, 11, 20, 18, 16, 19. Which one of many following is the postorder traversal of the tree? [GATE CSE 2020]

(A) 10, 11, 12, 15, 16, 18, 19, 20

(B) 11, 12, 10, 16, 19, 18, 20, 15

(C) 20, 19, 18, 16, 15, 12, 11, 10

(D) 19, 16, 18, 20, 11, 12, 10, 15

Answer: Right reply is (B)

For extra, consult with GATE | GATE CS 2020 | Query 15.

2. What’s the worst-case time complexity of inserting n parts into an empty linked checklist, if the linked checklist must be maintained in sorted order? Multiple reply could also be appropriate. [GATE CSE 2020]

(A) Θ(n)

(B) Θ(n log n)

(C) Θ(n2)

(D) Θ(1)

Answer: Right reply is (C)

For extra, consult with GATE | GATE CS 2020 | Query 26.

3. What’s the worst-case time complexity of inserting n2 parts into an AVL tree with n parts initially? [GATE CSE 2020]

(A) Θ(n4)

(B) Θ(n2)

(C) Θ(n2 log n)

(D) Θ(n3)

Answer: Right reply is (C)

For extra, consult with GATE | GATE CS 2020 | Query 16.

4. Take into account the next C program. [GATE CSE 2018]

#embody<stdio.h>
struct Ournode{
    char x,y,z;
};
int important(){
    struct Ournode p = {'1', '0', 'a'+2};
    struct Ournode *q = &p;
    printf ("%c, %c", *((char*)q+1), *((char*)q+2));
    return 0;
}

The output of this program is:

(A) 0, c

(B) 0, a+2

(C) ‘0’, ‘a+2’

(D) ‘0’, ‘c’

Answer: Right reply is (A)

For extra, consult with GATE | GATE CS 2018 | Query 33.

5. Take into account the next C Program [GATE CSE 2016]

void f(int, brief);
void important()
{
    int i = 100;
    brief s = 12;
    brief *p = &s;
    ___________ ; // name to f()
}

Which one of many following expressions, when positioned within the clean above, will NOT lead to a type-checking error?

(A) f(s, *s)

(B) i = f(i,s)

(C) f(i, *s)

(D) f(i, *p)

Answer: Right reply is (D)

For extra, consult with GATE | GATE-CS-2016 (Set 1) | Query 22.

6. A queue is carried out utilizing an array such that ENQUEUE and DEQUEUE operations are carried out effectively. Which one of many following statements is CORRECT (n refers back to the variety of objects within the queue)? [GATE CSE 2016]

(A) Each operations may be carried out in O(1) time

(B) At most one operation may be carried out on O(1) time however the worst-case time for the opposite operation shall be Ω(n)

(C) The worst-case time complexity for each operations shall be Ω(n)

(D) Worst case time complexity for each operations shall be Ω(log n)

Answer: Right reply is (A)

For extra, consult with GATE | GATE-CS-2016 (Set 1) | Query 20.

7. The outcome evaluating the postfix expression 10 5 + 60 6/ * 8 – is [GATE CSE 2015]

(A) 284

(B) 213

(C) 142

(D) 71

Answer: Right reply is (C)

For extra, consult with GATE | GATE-CS-2015 (Set 3) | Query 65.

8. Let A be a sq. matrix of dimension n x n. Take into account the next program. What’s the anticipated output? [GATE CSE 2014]

C = 100
for i = 1 to n do
    for j = 1 to n do
    {
        Temp = A[i][j] + C
        A[i][j] = A[j][i]
        A[j][i] = Temp - C
    }
for i = 1 to n do
    for j = 1 to n do
        Output(A[i][j]);

(A) The matrix A itself

(B) Transpose of the matrix A

(C) Including 100 to higher diagonal parts and subtracting 100 from diagonal parts of A

(D) Not one of the above

Answer: Right reply is (A)

For extra, consult with GATE | GATE-CS-2014-(Set-3) | Query 20.

9. Take into account the next program in C language: [GATE CSE 2014]

#embody<stdio.h>
important()
{
    int i;
    int *pi = &i;
    scanf("%d", pi);
    printf("%dn", i+5);
}

Which one of many following statements is TRUE?

(A) Compilation fails

(B) Execution leads to a run-time error

(C) On execution, the worth printed is 5 greater than the handle of variable i

(D) On execution, the worth printed is 5 greater than the integer worth entered

Answer: Right reply is (D)

For extra, consult with GATE | GATE-CS-2014-(Set-1) | Query 19.

10. A program P reads 500 integers within the vary [0, 100] representing the cores of 500 college students. It then prints the frequency of every rating above 50. What can be one of the simplest ways for P to retailer the frequencies? [GATE CSE 2005] 

(A) An array of fifty numbers

(B) An array of 100 numbers

(C) An array of 500 numbers

(D) A dynamically allotted array of 550 numbers

Answer: Right reply is (A)

For extra, consult with GATE | GATE-CS-2005 | Query 5.

GATE CSE Earlier 12 months Query Papers

These earlier yr’s questions assist you in understanding the query patterns adopted by GATE that instantly assist a candidate in scoring good marks in GATE. Under are the talked about hyperlinks of year-wise GATE Earlier Query Papers.

Final Up to date :
20 Might, 2023

Like Article

Save Article

Leave a Reply

Your email address will not be published. Required fields are marked *