OneStopGate.Com
OnestopGate   OnestopGate
   Sunday, November 24, 2024 Login  
OnestopGate
Home | Overview | Syllabus | Tutorials | FAQs | Downloads | Recommended Websites | Advertise | Payments | Contact Us | Forum
OneStopGate

GATE Resources
Gate Articles
Gate Books
Gate Colleges 
Gate Downloads 
Gate Faqs
Gate Jobs
Gate News 
Gate Sample Papers
Training Institutes

GATE Overview
Overview
GATE Eligibility
Structure Of GATE
GATE Coaching Centers
Colleges Providing M.Tech/M.E.
GATE Score
GATE Results
PG with Scholarships
Article On GATE
Admission Process For M.Tech/ MCP-PhD
GATE Topper 2012-13
GATE Forum




GATE 2025 Exclusive
Organizing Institute
Important Dates
How to Apply
Discipline Codes
GATE 2025 Exam Structure

GATE 2025 Syllabus
Aerospace Engg..
Agricultural Engg..
Architecture and Planning
Chemical Engg..
Chemistry
Civil Engg..
Computer Science / IT
Electronics & Communication Engg..
Electrical Engg..
Engineering Sciences
Geology and Geophysics
Instrumentation Engineering
Life Sciences
Mathematics
Mechanical Engg..
Metallurgical Engg..
Mining Engg..
Physics
Production & Industrial Engg..
Pharmaceutical Sciences
Textile Engineering and Fibre Science

GATE Study Material
Aerospace Engg..
Agricultural Engg..
Chemical Engg..
Chemistry
Civil Engg..
Computer Science / IT
Electronics & Communication Engg..
Electrical Engg..
Engineering Sciences
Instrumentation Engg..
Life Sciences
Mathematics
Mechanical Engg..
Physics
Pharmaceutical Sciences
Textile Engineering  and Fibre Science

GATE Preparation
GATE Pattern
GATE Tips N Tricks
Compare Evaluation
Sample Papers 
Gate Downloads 
Experts View

CEED 2013
CEED Exams
Eligibility
Application Forms
Important Dates
Contact Address
Examination Centres
CEED Sample Papers

Discuss GATE
GATE Forum
Exam Cities
Contact Details
Bank Details

Miscellaneous
Advertisment
Contact Us


Home » Gate Sample Papers » Computer Science + IT Engineering Sample Papers » GATE 1997 CS Computer Science Question Paper

GATE 1997 CS Computer Science Question Paper

GATE CS - 1997

SECTION A1. This question
contains 10 sub-parts each carrying ONE mark. Each sub-part contains a multiple-choice question. Write in your answer book the sub-part number and the letter a, b, c or d corresponding to the most appropriate answer. 1.1 The probability that it will rain today is 0.5. The probability that it will rain tomorrow is 0.6. The probability that it will rain either today or tomorrow is 0.7. What is the probability that it will rain today and tomorrow? (a) 0.3 (b) 0.25 (c) 0.35 (d) 0.4 2 1.2 The Newton-Raphson method is used to find the root of the equation x - = 2 0 .  If the iterations are started form �1, the iterations will (a) converge to -1 (b) converge to 2 (c) converge to - 2 (d) not converge 1.3 The determinant of the matrix � � 6 8 1 1 - � � 0 2 4 6 � �  is: � � 0 0 4 8 � � 0 0 0 1 - � � / (a) 11 (b) -48 (c) 0 (d) -24 1.4 The concatenation of two lists is to be performed on 0(1) time. Which of the following implementations of a list should be used? (a) Singly linked list (b) Doubly linked list (c) Circular doubly linked list (d) Array implementation of list 1.5 The correct matching for the following pairs is (A) All pairs shortest paths (1) Greedy (B) Quick Sort (2) Depth-First search (C) Minimum weight spanning tree (3) Dynamic Programming (D) Connected Components (4) Divide and Conquer (a) A � 2 B � 4 C � 1 D - 3 (b) A � 3 B � 4 C � 1 D - 2 (c) A � 3 B � 4 C � 2 D - 1 (d) A � 4 B � 1 C � 2 D - 3 1.6 In the following grammar Y X X Y :: = Y Y Z Z :: * = Z id :: = Which of the following is true? (a) " ' is left associative while "*' is right associative (b) Both " ' and "*' is left associative (c) " ' is right associative while "*' is left associative (d) None of the above 1.7 Which of the following is essential for converting an infix expression to the postfix form efficiently? (a) An operator stack (b) An operand stack (c) An operand stack and an operator stack (d) A parse tree 1.8 A language L allows declaration of arrays whose sizes are not known during compilation. It is required to make efficient use of memory. Which one of the following is true? (a) A compiler using static memory allocation can be written for L (b) A compiler cannot be written for L; an interpreter must be used. (c) A compiler using dynamic memory allocation can be written for L (d) None of the above 1.9 The conditional expansion facility of macro processor is provided to (a) test a condition during the execution of the expanded program (b) to expand certain model statements depending upon the value of a condition during the execution of the expanded program (c) to implement recursion (d) to expand certain model statements depending upon the value of a condition during the process of macro expansion. 1.10 Heap allocation is required for languages. (a) that support recursion (b) that support dynamic data structures (c) that use dynamic scope rules (d) None of the above 2. The question contains 5 subparts, each carrying 1 mark. Each subpart contains a multiple-choice question. Write in your answer book the subpart number and the letter a, b, c or d corresponding to the most appropriate answer. 2.1 Let * be defined as x*y= x +y. Let z = x*y. value of z*x is (a) x +y (b) x (c) 0 (d) 1 2.2 RST 7.5 interrupt in 8085 microprocessor executes service routing from interrupt vector location (a) 0000H (b) 0075H (c) 003CH (d) 0034H 2.3 Purpose of a start bit in RS 232 serial communication protocol is (a) to synchronize receiver for receiving every byte (b) to synchronize receiver for receiving a sequence of bytes (c) a parity bit (d) to synchronize receiver for receiving the last byte 2.4 The correct matching for the following pairs is (A) DMA I/O (1) High speed RAM (B) Cache (2) Disk (C) Interrupt I/O (3) Printer (D) Condition Code Register (4) ALU (a) A � 4 B � 3 C � 1 D - 2 (b) A � 2 B � 1 C � 3 D - 4 (c) A � 4 B � 3 C � 2 D - 1 (d) A � 2 B � 3 C � 4 D - 1 2.5 An N-bit carry lookhead adder, where N is a multiple of 4, employs ICs 74181 (4 bit ALU) and 74182 (4 bit carry lookhead generator). The minimum addition time using the best architecture for this adder is (a) proportional to N (b) proportional to log N (c) a constant (d) None of the above 3. The question contains 10 subparts, each carrying 1 mark. Each subpart contains a multiple-choice question. Write in your answer book the subpart number and the letter a, b, c or d corresponding to the most appropriate answer. 3.1 Let (Z,*) be an algebraic structure, where Z is the set of integers and the operation * is defined by n*m = maximum (n,m). which of the following statements is true for (Z,*)? (a) (Z,*) is a monoid (b) (Z,*) is an Abelian group (c) (Z,*) is a group (d) None of the above 3.2 Which of the following propositions is a tautology? (a) (p q) � p (b) p (q � p) (c) p (p � q) (d) p � (p � q) 3.3 In the lattice defined by the Hasse diagram given in following figure, how many  a complements does the element "e' have? (a) 2 b c (b) 3 g (c) 0 d e (d) 1 f 3.4 Given S ={a,b}, which one of the following sets is not countable? (a) Set of all strings over S (b) Set of all languages over S (c) Set of all regular languages over S (d) Set of all languages over S accepted by Turing machines 3.5 Locality of reference implies that the page reference being made by a process (a) will always be to the page used in the previous page reference (b) is likely to be to one of the pages used in the last few page references (c) will always be to one of the pages existing in memory (d) will always lead to a page fault 3.6 The correct matching for the following pairs is: (A) Disk scheduling (1) Round robin (B) Batch processing (2) SCAN (C) Time sharing (3) LIFO (D) Interrupt processing (4) FIFO (a) A � 3 B � 4 C � 2 D - 1 (b) A � 4 B � 3 C � 2 D - 1 (c) A � 2 B � 4 C � 1 D - 3 (d) A � 3 B � 4 C � 3 D - 2 3.7 I/O redirection (a) implies changing the name of a file (b) can be employed to use an existing file as input file for a program (c) implies connection 2 programs through a pipe (d) None of the above 3.8 When an interrupt occurs, an operating system (a) ignores the interrupt (b) always changes state of interrupted process after processing the interrupt (c) always resumes execution of interrupted process after processing the interrupt (d) may change state of interrupted process to "blocked' and schedule another process 3.9 Thrashing (a) reduces page I/O (b) decreases the degree of multiprogramming (c) implies excessive page I/O (d) improve the system performance 3.10 Dirty bit for a page in a page table (a) helps avoid unnecessary writes on a paging device (b) helps maintain LRU information (c) allows only read on a page (d) None of the above 4. The question contains 10 subparts, each carrying 2 marks. Each subpart contains a multiple-choice question. Write in your answer book the subpart number and the letter a, b, c or d corresponding to the most appropriate answer. ( ) 2 4.1 What is the maximum value of the function f x x x = - + 2 2 6 in the interval [0,2]? (a) 6 (b) 10 (c) 12 (d) 5.5 ( ) 4.2 Let a= a be an n-rowed square matrix and I be the matrix obtained by ij   1 2 interchanging the first and second rows of the n-rowed Identify matrix. Then AI is such that its first (a) row is the same as its second row (b) row is the same as the second row of A (c) column is the same as the second column of A (d) row is all zero " " 4.3 Using a forward Euler method to solve y (t) =f(t), y(0), y (0)=0 with a step size of h, we obtain the following values of y in the first four iterations: (a) 0, hf (0), h(f(0) + f(h)) and h(f(0) + f(h) = f(2h)) (b) 0, 0 h f(0) and 2h f(0)+f(h) 2 2 2 2 (c) 0, 0, h f(0) 3h f(0) (d) 0, 0, hf(0) + h f(0) and hf (0) + h f(0)+hf(h) 2 2 4.4 A polynomial p(x) is such that p(0) = 5, p(1) = 4, p(2) = 9 and p(3) = 20. the minimum degree it can have is (a) 1 (b) 2 (c) 3 (d) 4 4.5 A binary search tree contains the value 1, 2, 3, 4, 5, 6, 7, 8. The tree is traversed in pre-order and the values are printed out. Which of the following sequences is a valid output? (a) 5 3 1 2 4 7 8 6 (b) 5 3 1 2 6 4 8 7 (c) 5 3 2 4 1 6 7 8 (d) 5 3 1 2 4 7 6 8 n 4.6 Let T(n) be the function defined by T(1) = 1, T(n) = 2 2 T � ' + n for n = 2. � � Which of the following statements is true? ( ) (a) T n O n = (b) T(n) = O(n) (c) T(n) = O (log n) (d) None of the above 4.7 A priority queue Q is used to implement a stack that stores characters. PUSH (C) is implemented INSERT (Q, C, K) where K is an appropriate integer key chosen by the implementation. POP is implemented as DELETEMIN(Q). For a sequence of operations, the keys chosen are in (a) non-increasing order (b) non-decreasing order (c) strictly increasing order (d) strictly decreasing order 4.8 Given the following Pascal like program segment Procedure A; x,y:intger; Procedure B; x,z:real S1 end B; Procedure C; i:integer; S2 end C; end A; The variables accessible in S1 and S2 are (a) x or A, y, x of B and z in S1 and x of B, y and i in S2 (b) x or B, y and z in S1 and x of B, i and z in S2 (c) x or B, z and y in S1 and x of A, i and y in S2 (d) None of the above 4.9 The expression (a * b) * c op�. where "op' is one of "+', "*' and " ' (exponentiation) can be evaluated on a CPU with a single register without storing the value of (a * b) if (a) "op' is '+' or "*' (b) "op' is ' ' or "*' (c) "op' is ' ' or "+' (d) not possible to evaluate without storing � ( ) b 4.10 The trapezoidal method to numerically obtain f x dx has an error E bounded 12 where h is the width of the trapezoids. The minimum number of trapezoids - 4 guaranteed to ensure E = 10 is computing in 7 using 1 f x = is (a) 60 (b) 100 (c) 600 (d) 10000 5. The question contains 5 subparts, each carrying 2 marks. Each subpart contains a multiple-choice question. Write in your answer book the subpart number and the letter a, b, c or d corresponding to the most appropriate answer. ( ) f x y z x yx xz , , = + + be a switching function. Which one of the following is 5.1 Let valid? (a) y x is a prime implicant of f (b) xz is a minterm of f (c) xz is an implicant of f (d) y is a prime implicant of f 5.2 Contents of A register after the execution of the following 8085 microprocessor program is MVIA, 55 H MVI C, 25 H ADDC DAA (a) 7AH (b) 80H (c) 50H (d) 22H 5.3 A micro instruction is to be designed to specify (a) none or one of the three micro operations of one kind and (b) none or upto six micro operations of another kind The minimum number of bits in the micro-instruction is (a) 9 (b) 5 (c) 8 (d) None of the above ) ) 5.4 Given 224 13 . = r r The value of the radix r is: (a) 10 (b) 8 (c) 5 (d) 6 6. The question contains 10 subparts, each carrying 2 marks. Each subpart contains a multiple-choice question. Write in your answer book the subpart number and the letter a, b, c or d corresponding to the most appropriate answer. 6.3 The number of equivalence relations of the set {1,2,3,4} is (a) 15 (b) 16 (c) 24 (d) 4 6.4 Which one of the following regular expressions over {0,1} denotes the set of all strings not containing 100 as a substring? (a) 0*(1+0)* (b) 0*1010* (c) 0*1*01 (d) 0(10+1)* 6.5 Which one of the following is not decidable? (a) Given a Turing machine M, a stings s and an integer k, M accepts s within k steps  (b) Equivalence of two given Turing machines (c) Language accepted by a given finite state machine is not empty (d) Language generated by a context free grammar is non empty 6.6 Which of the following language over {a,b,c} is accepted by a deterministic pushdown automata? { } { } { } { } w w w a b , * (b) ww w a b c , , * R  R (a) { } (c) a b c n = 0 n n n { } { } (d) ww a b c is a palindrome over , , Note: w is the string obtained by reversing "w'. R 6.7 An operating system contains 3 user processes each requiring 2 units of resource R. the minimum number of units of r such that no deadlocks will ever arise is (a) 3 (b) 5 (c) 4 (d) 6 6.8 Each process Pi,i=1��9 is coded as follows repeat P(mutex) {critical section} v(mutex) forever The code for P is identical except that it uses v(mutex) in place of P(mutex). 10 What is the largest number of processes that can be inside the critical section at any moment? (a) 1 (b) 2 (c) 3 (d) None of the above 6.9 For a database relation R(a,b,c,d), where the domains of a, b, c, d include only atomic values, only the following functional dependencies and those that can be inferred from them hold: a c � b d � This relation is (a) in first normal form but not in second normal form (b) in second normal form but not in third normal form (c) in third normal form (d) None of the above 6.10 Let R (a, b, c) and S(d, e, f) be two relations in which d is the foreign key of S that refers to the primary key of R. Consider the following four operations R and S (a) Insert into R (b) Insert into S (c) Delete from R (d) Delete from S Which of the following is true about the referential integrity constraint above? (a) None of (a), (b), (c) or (d) can cause its violation (b) All of (a), (b), (c) and (d) can cause its violation (c) Both (a) and (d) can cause its violation (d) Both (b) and (c) can cause its violation 7. A D flip-flop is to be connected to an 8085-microprocessor chip as a 1-bit output port with a port address of FF hex. Data bit D should be involved in the data 3 transfer from CPU to the flip-flop. The flip-flop should be cleared on power ON. (a) Using only one NAND gate (fan in of 10), one NOT gate and one D flip-flop, draw the required interface logic circuit (only the relevant signals should be shown) (b) Write a program to generate a squarewave on the output of the flip-flop. ON and OFF periods of the square wave should be 7 bus cycles each. 8. Let L = {a , a , ��.., a ) n = 0 be a list whose Pascal representation is 1 2 n type list = record next: list; val : integer end n � � The following function returns a list in which a and a , 1 = i = are � � 2i 2 1 i 2 - interchanged. Complete the function by filling the boxes. Write the line number and the content of the box in your answer sheet. 1. function change (p: list): list; 2. var q.t : list; 3. begin 4. if p = nil then change : = p 5. else if p next = nil then change : 6. else begin 7. q : p next; 8. :=q; 9. t : q next; 10. :=p; 11. :=change(t) 12. end 13. end 9. Consider a graph whose vertices are points in the plane with integer co-ordinates (x,y) such that 1 = x = n and 1 = y = n, where n = 2 is an integer. Two vertices ( ) ( ) x y x y are adjacent , and , iff x x - = 1 and y y - = 1 . The weight of 1 1 2 2  1 2 1 2 { } ( ) ( ) ( ) ( ) 2 2 an edge x y x y x x y y , , , is - + - 1 1 2 2 1 2 1 2 (a) What is the weight of a minimum weight-spanning tree in this graph? Write only the answer without any explanations. (b) What is the weight of a maximum weight-spanning tree in this graph? Write only the answer without any explanations? 10. Consider the following program in Pseudo-Pascal syntax. program what: var z: integer procedure recur (x): begin if x = 40 then begin x: x + z; recur (x); z:=x+10 end end(*recur*) begin (*what*) z =10; recur(z); writeln(z) end (a) Suppose the parameter to the procedure "recur' is passed by value. (i) What value is printed by the program? (ii) How many time is "recur' called? (b) What value is printed by the program if the parameter is passed by reference? 11. Consider the grammar S bSc � S PQR � P bPc � P e � Q cQd � Q e � R dRe � R e � Where S, P, Q, R are non-terminal symbols with S being the start symbol; b, c, d, e are terminal symbols and " e ' is the empty string. This grammar generates strings of the form , , , b c d e for some i, j, k, m = 0. i j k m (a) What is the condition on the values of i,j,k,m? (b) Find the smallest string that has two parse trees. SECTION � B Answer any TEN questions from this section. All questions carry equal marks. 12. Consider a hash table with n buckets, where external (overflow) chaining is used to resolve collisions. The hash function is such that the probability that a key value is hashed to a particular bucket is 1 . n The hash table is initially empty and K distinct values are inserted in the table. (a) What is the probability that bucket number 1 is empty after the Kth insertion? (b) What is the probability that no collision has occurred in any of the K insertisons? (c) What is the probability that the first collision occurs at the Kth insertions? 13. Let F be the set of one-to-one functions from the set {1,2,�..,n} to the set {1,2,�..m} where m = n = 1. (a) How many functions are members of F? (b) How many functions f in F satisfy the property f(i)=1 for some i, 1 = i = n? (c) How many functions f in F satisfy the property f(i)



More Computer Science + IT Engineering Sample Papers
1 2 3 4 Next





Discussion Center

Discuss/
Query

Papers/
Syllabus

Feedback/
Suggestion

Yahoo
Groups

Sirfdosti
Groups

Contact
Us

MEMBERS LOGIN
  
Email ID:
Password:

  Forgot Password?
 New User? Register!

INTERVIEW EBOOK
Get 9,000+ Interview Questions & Answers in an eBook. Interview Question & Answer Guide
  • 9,000+ Interview Questions
  • All Questions Answered
  • 5 FREE Bonuses
  • Free Upgrades
GATE RESOURCES
 
  • Gate Books
  • Training Institutes
  • Gate FAQs
  • GATE BOOKS
     
  • Mechanical Engineeering Books
  • Robotics Automations Engineering Books
  • Civil Engineering Books
  • Chemical Engineering Books
  • Environmental Engineering Books
  • Electrical Engineering Books
  • Electronics Engineering Books
  • Information Technology Books
  • Software Engineering Books
  • GATE Preparation Books
  • Exciting Offers



    GATE Exam, Gate 2009, Gate Papers, Gate Preparation & Related Pages


    GATE Overview | GATE Eligibility | Structure Of GATE | GATE Training Institutes | Colleges Providing M.Tech/M.E. | GATE Score | GATE Results | PG with Scholarships | Article On GATE | GATE Forum | GATE 2009 Exclusive | GATE 2009 Syllabus | GATE Organizing Institute | Important Dates for GATE Exam | How to Apply for GATE | Discipline / Branch Codes | GATE Syllabus for Aerospace Engineering | GATE Syllabus for Agricultural Engineering | GATE Syllabus for Architecture and Planning | GATE Syllabus for Chemical Engineering | GATE Syllabus for Chemistry | GATE Syllabus for Civil Engineering | GATE Syllabus for Computer Science / IT | GATE Syllabus for Electronics and Communication Engineering | GATE Syllabus for Engineering Sciences | GATE Syllabus for Geology and Geophysics | GATE Syllabus for Instrumentation Engineering | GATE Syllabus for Life Sciences | GATE Syllabus for Mathematics | GATE Syllabus for Mechanical Engineering | GATE Syllabus for Metallurgical Engineering | GATE Syllabus for Mining Engineering | GATE Syllabus for Physics | GATE Syllabus for Production and Industrial Engineering | GATE Syllabus for Pharmaceutical Sciences | GATE Syllabus for Textile Engineering and Fibre Science | GATE Preparation | GATE Pattern | GATE Tips & Tricks | GATE Compare Evaluation | GATE Sample Papers | GATE Downloads | Experts View on GATE | CEED 2009 | CEED 2009 Exam | Eligibility for CEED Exam | Application forms of CEED Exam | Important Dates of CEED Exam | Contact Address for CEED Exam | CEED Examination Centres | CEED Sample Papers | Discuss GATE | GATE Forum of OneStopGATE.com | GATE Exam Cities | Contact Details for GATE | Bank Details for GATE | GATE Miscellaneous Info | GATE FAQs | Advertisement on GATE | Contact Us on OneStopGATE |
    Copyright © 2024. One Stop Gate.com. All rights reserved Testimonials |Link To Us |Sitemap |Privacy Policy | Terms and Conditions|About Us
    Our Portals : Academic Tutorials | Best eBooksworld | Beyond Stats | City Details | Interview Questions | India Job Forum | Excellent Mobiles | Free Bangalore | Give Me The Code | Gog Logo | Free Classifieds | Jobs Assist | Interview Questions | One Stop FAQs | One Stop GATE | One Stop GRE | One Stop IAS | One Stop MBA | One Stop SAP | One Stop Testing | Web Hosting | Quick Site Kit | Sirf Dosti | Source Codes World | Tasty Food | Tech Archive | Software Testing Interview Questions | Free Online Exams | The Galz | Top Masala | Vyom | Vyom eBooks | Vyom International | Vyom Links | Vyoms | Vyom World
    C Interview Questions | C++ Interview Questions | Send Free SMS | Placement Papers | SMS Jokes | Cool Forwards | Romantic Shayari