VOOZH about

URL: https://www.geeksforgeeks.org/quizzes/gate-c-programming-data-structure-pyqs-2010-to-2025/

⇱ Quiz about GATE|| C Programming & Data Structure || Pyqs (2010 to 2025 )


Last Updated :
Discuss
Comments

Question 1

Consider the following C function.
int fun ( int n ) {

int x = 1, k ;

if ( n == 1) return x ;

for( k = 1 ; k < n ; ++ k )

    x = x + fun( k ) * fun( n - k ) ;

return x ;

}
The return value of fun (5) is ________.

[GATE CSE 2015 ]

  • 51

Question 2

What are x and y in the following macro definition?
 

macro Add x,y
Load y
Mul x
Store y
end macro

  • Variables

  • Identifiers

  • Actual parameters

  • Formal parameters

Question 3

A certain processor supports only the immediate and the direct addressing modes. Which of the following programming language features cannot be implemented on this processor?

  • Pointers

  • Arrays

  • Records

  • Recursive procedures with local variable

Question 4

Consider the following statements regarding the front-end and back-end of a compiler: - [GATE 2023|| MCQ|| 1-mark]

S1: The front-end includes phases that are independent of the target hardware.
S2: The back-end includes phases that are specific to the target hardware.
S3: The back-end includes phases that are specific to the programming language used in the source code.

Identify the CORRECT option.


  • Only S1 is TRUE.

  • Only S1 and S2 are TRUE.

  • S1, S2, and S3 are all TRUE.


  • Only S1 and S3 are TRUE.

Question 5

What does the following program print?

2010 MCQ || 1-mark |

  • 2 2

  • 2 1

  • 0 1

  • 0 2

Question 6

2010 MCQ || 2-mark

  • -9

  • 5

  • 15

  • 19

Question 7

What does the following fragment of C-program print?

2011 MCQ || 1-mark

  • GATE2011

  • E2011

  • 2011

  • 011

Question 8

Consider the following recursive C function that takes two arguments.

What is the return value of the function foo when it is called as foo (513, 2)? 2011 MCQ || 2-mark


  • 9

  • 8

  • 7

  • 2

Question 9

Consider the following recursive C function that takes two arguments

What is the return value of the function foo when it is called as foo(345, 10) ? 2011 MCQ || 2-mark

  • 345

  • 12

  • 5

  • 3

Question 10

What will be the output of the following C program segment?

2012 MCQ || 2-mark

  • No Choice

  • Choice A

  • Choice A Choice B No Choice

  • Program gives no output as it is erroneous

There are 115 questions to complete.

Take a part in the ongoing discussion