OneStopGate.Com
OnestopGate   OnestopGate
   Wednesday, December 25, 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 Sample Questions - CSE1

GATE Sample Questions - CSE1

No.     Question
1    

Consider the following program segment for a hypothetical CPU having three user registers Rl, R2 and R3.

Instruction     Operation     Instruction Size (in words)
MOV Rl,5000     ; Rl  Memory[5000]     2
MOV R2,(R1)     ; R2 Memory[(Rl)]     1
ADD  R2,R3     ; R2 R2 + R3     1
MOV 6000, R2     ; Memory[6000] � R2     2
HALT     ; Machine halts     1

Let the clock cycles required for various operations be as follows:
Register to/from memory transfer :        3 clock cycles
ADD with both operands in register :    1 clock cycle
Instruction fetch and decode :               2 clock cycles per word
The total number of clock cycles required to execute the program is
Options    
A) 29     B) 24
C) 23     D) 20
Correct Answer     B
2     The order of an internal node in a B+ tree index is the maximum number of children it can have. Suppose that a child pointer takes 6 bytes, the search field value takes 14 bytes, and the block size is 512 bytes. What is the order of the internal node?
Options    
A) 24     B) 25
C) 26     D) 27
Correct Answer     C
3     The Boolean function x, y, + xy + x, y
Options    
A) x, + y,     B) x + y
C) x + y,     D) x, + y
Correct Answer     D
4     In an MxN matrix such that all non-zero entries are covered in a rows and b columns. Then the maximum number of non-zero entries, such that no two are on the same row or column, is
Options    
A) � a + b      B) �  max {a, b}
C) �  min {M-a, N-b}     D) � min {a, b}
Correct Answer     A
5     The relation scheme Student Performance (name, courseNo, rollNo, grade) has the following functional dependencies:
name, courseNo � grade
rollNo, courseNo � grade
name � rollNo
rollNo � name
The highest normal form of this relation scheme is
Correct Answer     A
6     The minimum number of page frames that must be allocated to a running process in a virtual memory environment is determined by
Options    
A) the instruction set architecture     B)  page size
C) physical memory size      D) number of processes in memory
Correct Answer     D
7    

Consider the following program segment for a hypothetical CPU having three user registers Rl, R2 and R3.

Instruction     Operation     Instruction Size (in words)
MOV Rl,5000     ; Rl � Memory[5000]     2
MOV R2,(R1)     ; R2 � Memory[(Rl)]     1
ADD  R2,R3     ; R2 � R2 + R3     1
MOV 6000, R2     ; Memory[6000] � R2     2
HALT     ; Machine halts     1

Consider that the memory is byte addressable with size 32 bits, and the program has been loaded starting from memory location 1000 (decimal). If an interrupt occurs while the CPU has been halted after executing the HALT instruction, the return address (in decimal) saved in the stack will be
Options    
A) 1007      B) 1020
C) 1024     D) 1028
Correct Answer     A
8     Let G be a simple graph with 20 vertices and 100 edges. The size of the minimum vertex cover of G is 8. Then, the size of the maximum independent set of G is
Options    
A) 12     B) 8
C) Less than 8     D) More than 12
Correct Answer     A
9      What does the following algorithm approximate? (Assume m > 1, � > 0).
x = m;
y-i;
while (x - y > �)
{     x =   (x + y) / 2 ;
       y = m/x ;
}
print (x) ;
Options    
A) log m      B)

m2

 
C) m1/2     D) m1/3
Correct Answer     C
10     Consider the following C program
main ()
{        int x, y, m, n ;
scanf ("%d %d", &x, &y);
/ * Assume x > 0 and y > 0 * /
 m = x;     n = y ;
while ( m ! = n)
{       if (m > n)
m = m � n;
 else
n = n - m ; }
printf("%d",n); }
The program computes
Options    
A) x + y, using repeated subtraction
    B) x mod y using repeated subtraction
C) the greatest common divisor of x and y
    D) the least common multiple of x and y
Correct Answer     C
11     The best data structure to check whether an arithmetic expression has balanced parentheses is a
Options    
A) queue      B) stack
C) tree      D) list
Correct Answer     B
12     A Priority-Queue is implemented as a Max-Heap. Initially, it has 5 elements. The level-order traversal of the heap is given below:
10, 8,5,3,2
Two new elements 1 and 7 are inserted in the heap in that order. The level-order traversal of the heap after the insertion of the elements is
Options    
A) 10,8,7,5,3,2,1     B) 10,8,7,2,3,1,5
C) 10,8,7,1,2,3,5     D) 10,8,7,3,2,1,5
Correct Answer     D
13    

Consider the following C program segment
struct CellNode {
struct CellNode *leftChild ;
int element;
struct CellNode *rightChild ;
};
int DoSomething (struct CellNode *ptr)
 {
int value = 0 ; if (ptr ! = NULL)
{    if (ptr->leftChild ! = NULL)
value = 1 + DoSomething    (ptr - > leftChild) ;
if (ptr - > rightChild ! = NULL)
value = max (value, 1 + DoSomething   (ptr - > rightChild)) ;
}
return (value);
}

The value returned by the function DoSomething when a pointer to the root of a
non-empty tree is passed as argument is
Options    
A) The number of leaf nodes in the tree
    B) The number of nodes in the tree
C) The number of internal nodes in the tree     D) The height of the tree
Correct Answer     D
14     An organization has a class B network and wishes to form subnets for 64 departments. The subnet mask would be
Options    
A) 255.255.0.0     B) 255.255.64.0
C) 255.255.128.0     D) 255.255.252.0
Correct Answer     D
15     Suppose the round trip propagation delay for a 10 Mbps Ethernet having 48-bit jamming signal is 46.4 ms. The minimum frame size is:
Options    
A) 94     B) 416
C) 464     D) 512
Correct Answer     C
16    

Consider the following C program segment:

char p [ 20];

char * s = "string" ;

int length = strlen (s) ;

for (i = 0 ; i < length; i++)

p[ i ] = s [length - i] ;

print f ("%s", p) ;
The output of the program is
Correct Answer     A
17     Consider the grammar
S � (S) | a
Let the number of states in SLR(1), LR(1) and LALR(1) parsers for the grammar be n1, n2 and n3 respectively. The following relationship holds good
Options    
A)  n1< n2 < n3     B) n1= n3 < n2
C) n1= n2 = n3     D) n1 � n3 � n2
Correct Answer     B
18     Consider the following C function:
int f (int n)
{ static int i = 1;
if (n >= 5) return n;
n = n + i;
i ++;
return f (n);
}
The value returned by f(1) is
Options    
A) 5     B) 6
C) 7     D) 8
Correct Answer     C
19     Consider the following code fragment:
if (fork ( ) = = 0)
{a = a + 5; print f (�%d, %d / n�, a, and a); }
else {a - 5; print f (� %d, %d / n�, a,& a); }
Let u, v be the values printed by the parent process, and x, y be the values printed by the child process. Which one of the following is TRUE?
Options    
A) u = x + 10 and v = y     B) u = x + 10 and v � y
C) u + 10 =x and v = y     D) u + 10 = x and v � y
Correct Answer     B
20     The following numbers are inserted into an empty binary search tree in the given order: 10, 1, 3, 5, 15, 12, 16. What is the height of the binary search tree (the height is the maximum distance of a leaf node from the root)?
Options    
A) 2     B) 3
C) 4     D) 6
Correct Answer     B



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