Reg. No. : Question Paper Code : 27157

Similar documents
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING UNIT-1

VALLIAMMAI ENGINEERING COLLEGE

CS PROGRAMMING & ATA STRUCTURES I. UNIT I Part - A

V.S.B ENGINEERING COLLEGE DEPARTMENT OF INFORMATION TECHNOLOGY I IT-II Semester. Sl.No Subject Name Page No. 1 Programming & Data Structures-I 2

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING B.E SECOND SEMESTER CS 6202 PROGRAMMING AND DATA STRUCTURES I TWO MARKS UNIT I- 2 MARKS

Reg. No. : Question Paper Code : B.E./B.Tech. DEGREE EXAMINATION, JANUARY First Semester GE 6151 COMPUTER PROGRAMMING

PROGRAMMING IN C++ (Regulation 2008) Answer ALL questions PART A (10 2 = 20 Marks) PART B (5 16 = 80 Marks) function? (8)

VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur

17CS33:Data Structures Using C QUESTION BANK

UNIT I : OVERVIEW OF COMPUTERS AND C-PROGRAMMING

Total No. of Questions :09] [Total No. of Pages : 02. II/IV B.Tech. DEGREE EXAMINATIONS, NOV/DEC First Semester CSE/IT DATA STRUCTURES USING C

R13. II B. Tech I Semester Supplementary Examinations, May/June DATA STRUCTURES (Com. to ECE, CSE, EIE, IT, ECC)

Bachelor Level/ First Year/ Second Semester/ Science Full Marks: 60 Computer Science and Information Technology (CSc. 154) Pass Marks: 24

A6-R3: DATA STRUCTURE THROUGH C LANGUAGE

1 P a g e A r y a n C o l l e g e \ B S c _ I T \ C \

Code No: R Set No. 1

Tribhuvan University Institute of Science and Technology Computer Science and Information Technology (CSC. 154) Section A Attempt any Two questions:

PESIT Bangalore South Campus Department of MCA Course Information for

End-Term Examination Second Semester [MCA] MAY-JUNE 2006

R10 SET - 1. Code No: R II B. Tech I Semester, Supplementary Examinations, May

S.E. (Computer) (First Semester) EXAMINATION, 2011 DATA STRUCTURES AND ALGORITHM (2008 PATTERN) Time : Three Hours Maximum Marks : 100

Table of Contents. Chapter 1: Introduction to Data Structures... 1

EC8393FUNDAMENTALS OF DATA STRUCTURES IN C Unit 3

Bharati Vidyapeeth s College Of Engineering for Women Pune-43 Department E & TC. SE- Unit Test I Subject-DS

Sample Question Paper

SAURASHTRA UNIVERSITY

VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANGULATHUR

R10 SET - 1. Code No: R II B. Tech I Semester, Supplementary Examinations, May

Preface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS

APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY THIRD SEMESTER B.TECH DEGREE EXAMINATION, JULY 2017 CS205: DATA STRUCTURES (CS, IT)

QUESTION BANK. Prepared by,mrs.d.maladhy AP/IT,RGCET. Page 1

VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING QUESTION BANK

CS301 - Data Structures Glossary By

(i) Describe in detail about the classification of computers with their features and limitations(10)

Prepared By: Ms. Nidhi Solanki (Assist. Prof.) Page 1

Question Paper Code : 97044

MULTIMEDIA COLLEGE JALAN GURNEY KIRI KUALA LUMPUR

INSTITUTE OF AERONAUTICAL ENGINEERING

1. Attempt any three of the following: 15

DATA STRUCTURE : A MCQ QUESTION SET Code : RBMCQ0305

Advanced C Programming and Introduction to Data Structures

CS PROGRAMMING & DATA STRUCTURES. UNIT I Part - A. 2. What is the difference between if and while statement?

Subject: PROBLEM SOLVING THROUGH C Time: 3 Hours Max. Marks: 100

PROGRAMMING IN C AND C++:

CS 445: Data Structures Final Examination: Study Guide

About this exam review

FINALTERM EXAMINATION Fall 2009 CS301- Data Structures Question No: 1 ( Marks: 1 ) - Please choose one The data of the problem is of 2GB and the hard

Data Structures Through C. Student Workbook

Questions Bank. 14) State any four advantages of using flow-chart

DYNAMIC MEMORY ALLOCATION AND DEALLOCATION

M4.1-R3: PROGRAMMING AND PROBLEM SOLVING THROUGH C LANGUAGE

Long Questions. 7. How does union help in storing the values? How it differs from structure?

TIME: 3 HOURS MARKS: a. Develop a java program to sort an array of N numbers in ascending order. (40)

Discuss the following operations on One-Dimensional array with algorithms.

CS 8391 DATA STRUCTURES

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

Lab Manual. Program Design and File Structures (P): IT-219

FORTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLIGY- MARCH, 2012 DATA STRUCTURE (Common to CT and IF) [Time: 3 hours

UCS-406 (Data Structure) Lab Assignment-1 (2 weeks)

DS ata Structures Aptitude

CS 61B Summer 2005 (Porter) Midterm 2 July 21, SOLUTIONS. Do not open until told to begin

Second Semester - Question Bank Department of Computer Science Advanced Data Structures and Algorithms...

Draw a diagram of an empty circular queue and describe it to the reader.

Programming and Data Structure Solved. MCQs- Part 2

Computer Science Foundation Exam. Dec. 19, 2003 COMPUTER SCIENCE I. Section I A. No Calculators! KEY

GUJARAT TECHNOLOGICAL UNIVERSITY COMPUTER ENGINEERING (07) / INFORMATION TECHNOLOGY (16) / INFORMATION & COMMUNICATION TECHNOLOGY (32) DATA STRUCTURES

Introduction p. 1 Pseudocode p. 2 Algorithm Header p. 2 Purpose, Conditions, and Return p. 3 Statement Numbers p. 4 Variables p. 4 Algorithm Analysis

VALLIAMMAI ENGINEERING COLLEGE

FORTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLIGY- OCTOBER, 2012 DATA STRUCTURE

a) State the need of data structure. Write the operations performed using data structures.

Largest Online Community of VU Students

END TERM EXAMINATION

For Solved Question Papers of UGC-NET/GATE/SET/PGCET in Computer Science, visit

MLR Institute of Technology

E.G.S. PILLAY ENGINEERING COLLEGE (An Autonomous Institution, Affiliated to Anna University, Chennai) Nagore Post, Nagapattinam , Tamilnadu.

ASSIGNMENTS. Progra m Outcom e. Chapter Q. No. Outcom e (CO) I 1 If f(n) = Θ(g(n)) and g(n)= Θ(h(n)), then proof that h(n) = Θ(f(n))

Aryan College. Fundamental of C Programming. Unit I: Q1. What will be the value of the following expression? (2017) A + 9

COMPUTER PROGRAMMING LAB

C Syntax Arrays and Loops Math Strings Structures Pointers File I/O. Final Review CS Prof. Jonathan Ventura. Prof. Jonathan Ventura Final Review

DATA STRUCTURES USING C

CSCI 171 Chapter Outlines

DC104 DATA STRUCTURE JUNE Q.2 a. If you are using C language to implement the heterogeneous linked list, what pointer type will you use?

B. V. Patel Institute of Business Management, Computer & Information Technology, UTU 2013

Solution for Data Structure

I Year MCA I Semester L T P To C FOUNDATIONS OF INFORMATION TECHNOLOGY

DEPARTMENT OF COMPUTER APPLICATIONS B.C.A. - FIRST YEAR ( REGULATION) SECOND SEMESTER LESSON PLAN SRM INSTITUTE OF SCIENCE AND TECHNOLOGY

Visit ::: Original Website For Placement Papers. ::: Data Structure

CP2 Revision. theme: dynamic datatypes & data structures

CS8391-DATA STRUCTURES QUESTION BANK UNIT I

C Refresher, Advance C, Coding Standard, Misra C Compliance & Real-time Programming

Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: Ph:

Ashish Gupta, Data JUET, Guna

A. Year / Module Semester Subject Topic 2016 / V 2 PCD Pointers, Preprocessors, DS

Revised time table of BCA (2011 admission) record submission

SRM ARTS AND SCIENCE COLLEGE SRM NAGAR, KATTANKULATHUR

B.V. Patel Institute of Business Management, Computer & Information Technology, Uka Tarsadia University

CS8391-DATA STRUCTURES

DR. A.P.J. ABDUL KALAM TECHNICAL UNIVERSITY LUCKNOW. Evaluation Scheme & Syllabus. For. B.Tech. First Year (Programming for Problem Solving)

CS 326 Operating Systems C Programming. Greg Benson Department of Computer Science University of San Francisco

KLiC C Programming. (KLiC Certificate in C Programming)

Transcription:

WK 3 Reg. No. : Question Paper Code : 27157 B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER 2015. Time : Three hours Second Semester Computer Science and Engineering CS 6202 PROGRAMMING AND DATA STRUCTURES I 1. What is recursion? Give example. (Common to Information Technology) (Regulations 2013) Answer ALL questions. PART A (10 2 = 20 marks) 2. What will be output of following program? #include<stdio.h> int main() { int i = 3; int *j; int **k; j = &i; k = &j; printf("%u %u %d '', k,*k,**k); return 0; } Maximum : 100 marks 3. Write a simple program to read the Numbers from the file and display numbers. 4. Compare structure and union. 5. What is Abstract data type? Give example. 6. What is doubly circularly linked list? 7. What is Stack and Queue? 8. Evaluate the following expression using stack. 5 6 2 + * 8 4 / 9. What is rehashing? 10. Compare linear search and binary search.

WK 3 PART B (5 16 = 80 marks) 11. (a) (i) Explain the various Conditional and Control statements in C. (10) Write a function, which will take an array as an argument along with another argument-size and based on the passed arguments, it will return average of the numbers passed through the array. (6) (i) Write a C program to find sum of two matrix of order 2*2 using arrays. Get the Elements of matrix from the user. (10) What is a function pointer? With example explain how to use function pointer. (6) 12. (a) (i) Create a structure Complex (data members-real and imag). Write a function to add two complex numbers, which will take 2 complex numbers as arguments and return the complex number. (8) Create a structure employee (data members Name and salary). Write a function, using array of objects get 5 employees details and display them. (8) (i) Write a program to read a file and count the number of characters and lines in it. (8) Give the format and use of the following File Handling operations in C : fopen, fread, fwrite and fseek (8) 13. (a) (i) Write a function to add two Polynomials using linked list. (8) Write a routine to merge given two sorted linked lists. (8) What is meant by doubly linked list? Write the functions to perform the following operations in a doubly linked list. (i) Insert after a specified node (6) Delete the node at a given position. (5) (iii) Display from the beginning to end. (5) 14. (a) (i) What is a circular queue and double-ended queue? Give suitable examples to differentiate them. (6) Write a routine to implement the Circular queue using array. (10) Discuss any two applications of stack with relevant examples. (16) 15. (a) (i) Sort the following sequence using Quick sort algorithm. Choose the pivot as median. (8) 38 81 22 48 13 69 93 14 45 58 79 72 Write a routine for Merge sort. (8) Explain the following collision resolution strategies with example. (i) Separate chaining (5) Linear probing (5) (iii) Quadratic probing. (6) 2 27157

Reg. No. Question Paper Code : 57235 B.E./B.Tech. DEGREE EXAMINATION, MAY/JUNE 2016 Second Semester Computer Science and Engineering CS 6202 PROGRAMMING AND DATA STRUCTURES I (Common to Information Technology) (Regulations 2013) Time : Three Hours Maximum : 100 Marks Answer ALL questions. PART A (10 2 = 20 Marks) 1. What is pointer of pointer? Give Example. 2. Write the difference between while and do-while loop. 3. Write a C program to read a single character from a file. 4. Differentiate between random access and sequential access file. 5. Define ADT. 6. What is circular linked list? 7. Given the infix for an expression, write its prefix a*b/c+d. 8. How do you define double ended Queue? 9. What is the time complexity of the insertion sort? 10. What is hashing? 09-06 1 57235

PART B (5 16 = 80 Marks) 11. (a) Explain in detail about variable number of arguments with an example. (16) OR What is function pointer? Write a C program to add two matrices using function pointer. (16) 12. (a) (i) Write a C program to read the contents of a file input.txt and write the contents to output.txt. (8) Explain in detail about random access file concept with an example. (8) OR Explain in detail about structure with suitable example. (16) 13. (a) Write C code for singly linked list with insert, delete, display operations using structure pointer. (16) OR Illustrate the algorithms to implement the doubly linked list and perform all the operations on the created list. (16) 14. (a) (i) Develop an algorithm to implement Queue ADT.Give relevant examples and diagrammatic representations. (12) Differentiate between double ended queue and Circular queue. (4) OR (i) Write an algorithm to convert the infix expression to postfix expression. (10) Show the simulation using stack for the following expression to convert infix to postfix : p*q+(r-s/t). (6) 15. (a) Explain the following : (i) Binary searching (8) Rehashing OR Sort the following integer elements using Quick Sort 40,20,70,14,60,61,97,30 (16) (8) 2 57235

Sp7 Reg. No. : Question Paper Code : 71672 B.E./B.Tech. DEGREE EXAMINATION, APRIL/MAY 2017. Second Semester Computer Science and Engineering CS 6202 PROGRAMMING AND DATA STRUCTURES I (Common to Information Technology) (Regulations 2013) Time : Three hours Maximum : 100 marks Answer ALL questions. PART A (10 2 = 20 marks) 1. State the output of the code and justify the answer. #include<stdio.h> main( ) { char const *st= HeIlo ; *st= M ; printf(%c\n, st); st = Bye ; printf( %s\n, st); } 2. Identify the errors in the following Preprocessor statements. #define ABS(x) (x>0)?(x) : (-x) #ifdef(flag) #endif #undef FLAG

Sp7 3. State the output of the code and give the explanation. #include<stdio.h> main( ) { } struct aa { int x; char y; }; struct bb { int z; }; union A { struct aa a; struct bb b; }B; B.a.x = 512; Printf( %d %d %d, B.a.x, B.a.y, B.b.z); 4. Mention the different file opening modes in C. 5. Define abstract data type. 6. What are the advantages and disadvantages of linked lists over arrays? 7. Define stack. List some of the applications of stack. 8. What are double ended queues? 9. Sort the following numbers using insertion sort. 3, 1, 4, 1, 5, 9, 2, 6, 5 10. Give the significance of extendible hashing. PART B (5 16 = 80 marks) 11. (a) (i) Write a C program using functions to add two matrices and return the resultant matrix to the calling function. (8) Write a C Program to implement any four string handling functions using functions and pointers. (8) (i) Write a program to convert all the upper-case letters to lower-case and vice versa in a given string. (8) Explain about how to declare pointer to a function with an example. (8) 2 71672

Sp7 12. (a) Define a structure to store details of 10 bank customers with customer name, account no., balance, and city. Write a C program to store the details of the customer in the bank, access and print the customer details for a specified account no. (16) (i) Write a C-program to read the contents of file in.txt and write the contents to a file out. txt. (8) Explain about file manipulators with snippet code for each. (8) 13. (a) Develop a C program to split a linked list into two sub lists containing odd and even ordered elements in them respectively. (16) Write a C program to add two polynomials using linked list. (16) 14. (a) (i) Write an algorithm to convert the infix expression to postfix expression using stack. (8) Simulate the conversion of infix to postfix expression using stack for the following expression : (8) 3 (4 / 2 ) + (1 * 5) + 6 (i) Formulate an ADT to implement Queue using inked list. (8) Write a C Program to implement the circular queue using arrays. (8) 15. (a) (i) Sort the following sequence using quick sort. (8) 3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5 Write a C program to search a number with the given set of numbers using binary search. (8) Illustrate with example the open addressing and chaining methods of collision resolution techniques in hashing. (16) 3 71672

WK 3 Reg. No. : Question Paper Code : 77092 B.E./B.Tech. DEGREE EXAMINATION, APRIL/MAY 2015. Time : Three hours Second Semester Computer Science and Engineering CS 6202 PROGRAMMING AND DATA STRUCTURES I (Common to Information Technology) (Regulation 2013) Answer ALL questions. PART A (10 2 = 20 marks) 1. Give two examples of C preprocessors with syntax. 2. What are function pointers in C? Explain with example. 3. What is the difference between getc( ) and getchar( )? Explain. 4. Explain the syntax as given below: fread(&my_record,sizeof(struct rec),1,ptr_myfile); 5. Define ADT. 6. What is static linked list? State any two applications of it. Maximum : 100 marks 7. Write the syntax of Calloc ( ) and Realloc ( ) and mention its application in linked list. 8. Given the prefix for an expression, write its postfix : * + a b c / e f g / h i 9. What is meant by internal and external sorting? Give four examples of each type. 10. State the applications of linear and binary search techniques.

WK 3 PART B (5 16 = 80 marks) 11. (a) (i) Write a function that returns a pointer to the maximum value of an array of double s. If the array is empty, return NULL. double * maximum(double * a, int size); (8) Write a C program to find all the roots of a quadratic equation. (8) (i) Write a C Program using function to check if the given input number is palindrome or not. (8) Explain the C preprocessor operators, each with a neat example that is used to create macros. (8) 12. (a) (i) Write a C program that uses functions to perform the following operations using structure : (1) Reading a complex number (2) Writing a complex number (3) Addition of two complex numbers (4) Multiplication of two complex numbers (12) State the advantages and disadvantages of structures and unions in C programming. (4) (i) Perform the following to manipulate file handling using C. (1) Define an input file handle called input_file, which is a pointer to a type FILE. (2) Using input_file, open the file results.dat for read mode. (3) Write C statements which tests to see if input_file has opened the data file successfully. If not, print an error message and exit the program. (4) Write C code which will read a line of characters (terminated by a \n) from input_file into a character array called buffer. NULL terminate the buffer upon reading a \n. (5) Close the file associated with input_file. (12) Using C Programming, display the contents of a file on screen. (4) 13. (a) Write a C Program to perform addition, subtraction and multiplication operations on polynomial using linked list. (16) Write C Code for Circular link list with create, insert, delete, display operations using structure pointer. (16) 2 77092

WK 3 14. (a) (i) Write C Program that checks if expression is correctly parenthesized using stack. (12) Write the function to check for stack status as Full ( ) or Empty ( ). (4) Write C Program to Implement Queue Functions Using Arrays and Macros. (16) 15. (a) (i) Sort the given integers and show the intermediate results using shell sort 35, 12, 14, 9, 15, 45, 32, 95, 40, 5 (8) Write C code to sort an integer array using shell sort. (8) (i) Write a C Code to perform binary search. (10) Explain the Rehashing techniques. (6) 3 77092

Ws11 Reg. No. : Question Paper Code : 80286 B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER 2016. Time : Three hours Second Semester Computer Science and Engineering CS 6202 PROGRAMMING AND DATA STRUCTURES I (Common to Information Technology) (Regulations 2013) Answer ALL questions. PART A (10 2 = 20 marks) 1. Differentiate between call by value and call by reference. 2. What are preprocessor directives? Give examples. 3. Write the different file manipulators. 4. Mention the functions for opening the file in read mode. 5. What is an ADT? 6. What is data structure? How it is classified? 7. Define Queue. 8. Give any two applications of stack. Maximum : 100 marks 9. Name the sorting techniques which use the divide and conquer strategy. 10. What is the difference between linear search and binary search? PART B (5 16 = 80 marks) 11. (a) Explain functions with variable number of arguments in detail. Write a C program to find the sum of n numbers using functions with variable number of arguments. (16) Explain the following: (i) Function pointer in C (8) Control Statements in C. (8)

Ws11 12. (a) (i) What is a structure? Write a C program to add and subtract the two complex numbers using structures. (8) Explain the concept of random access files with an example. (8) Store ten names of students in a file called data.txt. Perform operations to sort their names alphabetically. Write the sorted names into another file called names.txt. Display the names from names.txt by opening the file in read mode. Close the files after performing all operations. (16) 13. (a) What is singly linked list? Write a C program that uses functions to perform the following operation on singly list with suitable diagrammatic representations. Consider all cases: (i) Insertion Deletion (iii) Traversal in both ways. (16) Illustrate the necessary algorithms to implement doubly linked list and perform all the operations on the created list. (16) 14. (a) Develop an algorithm to implement Stack ADT. Give relevant examples with diagrammatic representations. (16) (i) Write an algorithm to implement circular queue using arrays. (10) Show the simulation using stack for converting the expression p*q+(r-s/t) from infix to prefix. (6) 15. (a) (i) Sort the given integers and show the intermediate results using selection sort. 45, 25, 10, 2, 9, 85, 102, 1. (8) Write a C code to sort an integer array using selection sort. (8) What is hashing? Explain open addressing and separate chaining methods of collision resolution techniques with examples. (16) 2 80286

Sp 4 Reg. No. Question Paper Code : 97218 B.E./B.Tech. DEGREE EXAMINATION, DECEMBER 2015/JANUARY 2016 Time : Three hours Second Semester Computer Science and Engineering CS 6202 PROGRAMMING AND DATA STRUCTURES I (Common to Information Technology) (Regulations 2013) Answer ALL questions. PART A (10 2 = 20 marks) 1. List any four advantages of pointers. 2. Give the significance of function declaration. 3. Compare Structures and Unions. 4. List the file opening modes in C. 5. Define an abstract type. List out few. 6. What are the advantages of linked lists over arrays? 7. Define Queue. 8. What is double ended queue? 9. Sort the following numbers using bubble sort 10,5,7,11,4,1 10. Define hashing. PART B (5 16 = 80 marks) Maximum : 100 marks 11. (a) (i) Illustrate the various control structures used in C with suitable example. (10) Write a C Program to implement the following string handling functions using functions and pointers. (1) Strlen ( ) (2) Strcat ( ) (3) Strcpy ( ) (6)

Sp 4 (i) Write a program to print the Fibonacci series using recursion. (6) Write a C Program with functions and pointers to multiply two matrices and return the resultant matrix to the calling function. (10) 12. (a) Define a structure data type named date containing three integer members day, month and year. Develop an interactive modular program to perform the following tasks : (i) To read data into structure members by a function. (8) To print the date in the following format : April 15, 2011 by a second function. (8) Write a C program to create a file that could store details about five products. Details include product code, product name, cost and number of items available which are provided through keyboard. Get the input as product code and display the details of the product from the file. 13. (a) Illustrate the algorithms to create the singly linked list and perform all the operations on the created list. Write a program to add two polynomials using linked list. 14. (a) (i) Write an algorithm to convert the infix expression to postfix expression. (10) Show the simulation using stack for the following expression : 12 +3 * 14 (5* 16) + 7 (6) (i) Write an algorithm to implement the circular queue using arrays. (10) List the applications of queues. (6) 15. (a) (i) Sort the following sequence using quick sort. 2, 13,45,56,27, 18,24,30,87,9 (8) Write an algorithm to search a number in a given set of numbers using binary search. (8) Explain the open addressing and chaining methods of collision resolution techniques in hashing. 2 97218