GATE (Graduate Aptitude Test in Engineering) Computer Science: Questions 1957 - 1961 of 2080

Access detailed explanations (illustrated with images and videos) to 2080 questions. Access all new questions- tracking exam pattern and syllabus. View the complete topic-wise distribution of questions. Unlimited Access, Unlimited Time, on Unlimited Devices!

View Sample Explanation or View Features.

Rs. 550.00 -OR-

How to register? Already Subscribed?

Question 1957

Appeared in Year: 2015

Question

MCQ▾

The output of the following C program is ________.

  1. voidf1 ( inta, intb )
  2. {
  3. intc;
  4.  c =a; a =b; b =c;
  5. }
  6. voidf2 ( int ⚹a, int ⚹b )
  7. {
  8. intc;
  9.  c=⚹a; ⚹a=⚹b; ⚹b =c;
  10. }
  11. intmain ( )
  12. {
  13. inta =4, b =5, c =6;
  14.  f1 ( a, b ) ;
  15.  f2 ( &b, &c ) ;
  16.  printf (  "%d"  , c -a -b ) ;
  17. return0;
  18. }

Choices

Choice (4)Response

a.

5

b.

c.

3

d.

Question 1958

Appeared in Year: 2015

Question

MCQ▾

Consider a Johnson counter with an initial value of . The counting sequence of this counter is:

Choices

Choice (4)Response

a.

b.

c.

d.

Question 1959

Appeared in Year: 2015

Question

MCQ▾

Let G be a connected planar graph with vertices. If the number of edges on each face is three, then the number of edges in G is ________.

Choices

Choice (4)Response

a.

64

b.

24

c.

32

d.

20

Question 1960

Appeared in Year: 2015

Question

MCQ▾

The binary operator ≠ is defined by the following truth table

Operator Truth Table
pqp ≠ q
000
011
101
110

Which one of the following is true about the binary operator ≠ ?

Choices

Choice (4)Response

a.

Not commutative but associative

b.

Commutative but not associative

c.

Both commutative and associative

d.

Neither commutative nor associative

Question 1961

Appeared in Year: 2015

Question

Match List-Ⅰ List-Ⅱ▾

Match the following

List-Ⅰ (Column-I)List-Ⅱ (Column-II)
(A)

Hamiltonian

(i)

Backtracking

(B)

Merge-sort

(ii)

Divide and conquer

(C)

Floyd-Warshall algorithm for all pair՚s shortest paths

(iii)

Greed method

(D)

Prim՚s algorithm for minimum spanning tree

(iv)

Dynamic programming

Choices

Choice (4)Response
  • (A)
  • (B)
  • (C)
  • (D)

a.

  • (ii)
  • (i)
  • (iii)
  • (iv)

b.

  • (i)
  • (iii)
  • (iv)
  • (ii)

c.

  • (iii)
  • (i)
  • (iv)
  • (ii)

d.

  • (i)
  • (ii)
  • (iv)
  • (iii)

Developed by: