DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING UNIT-1

Similar documents
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

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

Reg. No. : Question Paper Code : 27157

Code No: R Set No. 1

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

UNIT I : OVERVIEW OF COMPUTERS AND C-PROGRAMMING

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

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?

EC8393FUNDAMENTALS OF DATA STRUCTURES IN C Unit 3

SAURASHTRA UNIVERSITY

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

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

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

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

CS6202 PROGRAMING AND DATASTRUCTURE-I

VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANGULATHUR

17CS33:Data Structures Using C QUESTION BANK

PERIYAR CENTENARY POLYTECHNIC COLLEGE Periyar Nagar- Vallam Thanjavur

Mode Meaning r Opens the file for reading. If the file doesn't exist, fopen() returns NULL.

UNIT IV-2. The I/O library functions can be classified into two broad categories:

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

Writing an ANSI C Program Getting Ready to Program A First Program Variables, Expressions, and Assignments Initialization The Use of #define and

PESIT Bangalore South Campus Department of MCA Course Information for

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

KLiC C. About. Tools: Turbo C++ Syllabus:

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


VALLIAMMAI ENGINEERING COLLEGE

CSCI 171 Chapter Outlines

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

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

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

MULTIMEDIA COLLEGE JALAN GURNEY KIRI KUALA LUMPUR

Government of Karnataka Department of Technical Education Bengaluru

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

DATA STRUCTURES USING C

C Programming Language

DYNAMIC MEMORY ALLOCATION AND DEALLOCATION

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

Quick review of previous lecture Ch6 Structure Ch7 I/O. EECS2031 Software Tools. C - Structures, Unions, Enums & Typedef (K&R Ch.

Course Title: C Programming Full Marks: Course no: CSC110 Pass Marks: Nature of course: Theory + Lab Credit hours: 3

Unit 6 Files. putchar(ch); ch = getc (fp); //Reads single character from file and advances position to next character

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

The Waite Group's. New. Primer Plus. Second Edition. Mitchell Waite and Stephen Prata SAMS

KLiC C Programming. (KLiC Certificate in C Programming)

VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur

A Programming Approach with C DHARMENDER SINGH KUSHWAHA

Contents. Preface. Introduction. Introduction to C Programming

CSI 402 Lecture 2 Working with Files (Text and Binary)

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

C-LANGUAGE CURRICULAM

CSI 402 Lecture 2 (More on Files) 2 1 / 20

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

CS 445: Data Structures Final Examination: Study Guide

Computer Programming Unit v

DATA STRUCTURE : A MCQ QUESTION SET Code : RBMCQ0305


DATA STRUCUTRES. A data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently.

Software Development & Education Center C Programming

I BCA[ ] SEMESTER I CORE: C PROGRAMMING - 106A Multiple Choice Questions.

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

CSE 230 Intermediate Programming in C and C++

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

DATA STRUCTURES THROUGH C++

Department of Computer Science and Technology

Darshan Institute of Engineering & Technology for Diploma Studies Unit 6

1) What is information system? Describe the basic concepts of information systems.

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

Data Structures Through C. Student Workbook

File System User API

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))

Model Viva Questions for Programming in C lab

Systems Programming. 08. Standard I/O Library. Alexander Holupirek

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

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

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

PA3 Design Specification

DATA STRUCTURE UNIT I

8. Structures, File I/O, Recursion. 18 th October IIT Kanpur

Content. Input Output Devices File access Function of File I/O Redirection Command-line arguments

EMBEDDED Systems. Functions. MODULE- 1 C programming with data Structure Introduction to C. Array and String. Control Flow Statements In C

The Foundation of C++: The C Subset An Overview of C p. 3 The Origins and History of C p. 4 C Is a Middle-Level Language p. 5 C Is a Structured

Input / Output Functions

fopen() fclose() fgetc() fputc() fread() fwrite()

Input/Output: Advanced Concepts

C Basics And Concepts Input And Output

Program Design (II): Quiz2 May 18, 2009 Part1. True/False Questions (30pts) Part2. Multiple Choice Questions (40pts)

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

PESIT-BSC Department of Science & Humanities

Library Functions. General Questions

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

Files and Streams Opening and Closing a File Reading/Writing Text Reading/Writing Raw Data Random Access Files. C File Processing CS 2060

About this exam review

Programming and Data Structure Solved. MCQs- Part 2


Linear Data Structure

M1-R4: Programing and Problem Solving using C (JULY 2018)

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

Standard C Library Functions

Transcription:

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Year & Semester : I / II Section : CSE - 1 & 2 Subject Code : CS6202 Subject Name : Programming and Data Structures-I Degree & Branch : B.E C.S.E. 2 MARK QUESTIONS: UNIT-1 1. List out the Conditional and Control statements in C. 2. Differentiate Break and Continue statement. 3. Differentiate function declaration and function definition. 4. What is Recursion? List out merits and demerits. 5. How multi-dimensional arrays are stored in C? 6. How arrays are passed to function? 7. What is a preprocessor? Give any two examples. 8. What is a String? How strings are printed in C? 9. Differentiate strchr() and strrchr() & sizeof() and strlen(). 10. What is a pointer? List out the benefits of pointers. 11. What is a pointer to pointer? 12. What is an array of pointers? 13. Distinguish (*p)[5] and *p[5]. 14. What is a pointer to function? 15. What is the use of stdarg.h? Give an example. 16. Give example for Pointer Arithmetic. 17. Write the features of Pointers.

18. Give differences between union and structure. 19. Define self referential structure with example. 20. What values does the following code print? int k; int num = 30; k = num > 5? (num <= 10? 100:200):500; printf ( "k = %d\n", k ); 16 MARK QUESTIONS: 1. What are the different primary and derived and void data types used in C? Give examples. 2. Explain the conditional and loop statements available in C with a example program. 3. Distinguish between the following: i. Actual and formal arguments ii. Global and local variables iii. Automatic and static variables iv. Scope and visibility of variables v. & operator and * operator 4. How 2D arrays are declared in C? Explain with an example. 5. Explain about pointers, and how the pointer variables are declared? 6. Describe the ways of passing parameters to functions with example. 7. Explain about pointer to function and how to pass the pointers to function? 8. What is a string? Also explain different string functions with example. 9. Explain how function with variable number of arguments is used in C program with an example. 10. Explain the structure of C program.

UNIT-2 2 Marks Questions 1. Differentiate Structure and Union. 2. How structure is declared and structure variable are accessed? 3. How does a structure differ from an array? 4. What is an array of structure and give example 5. What is slack byte? 6. What is meant by the following terms? a) Nested structures b) Array of structures 7. What is a pointer to structure? Give example 8. When do we use the following? a) Unions b) The Bitwise and sizeof() operator 9. What is a file? List out the file handling functions. 10. Explain the modes operation used in file. 11. Describe the use and limitations getc() and putc() 12. What is the Significance of EOF? 13. How does an append mode differ from a write mode? 14. Explain the general format of fseek() function? 15. What are the common uses of rewind() and ftell() functions? 16. What is the difference between rewind(fp); and fseek(fp,0l,2);? 17. Distinguish between getc() and getw(). 18. Distinguish getc() and getchar(). 19. When a program is terminated, all the files used by it are automatically closed. Whys is it then necessary to close a file during execution of the program? 20. Explain fread() and fwrite()

16/10/8 Marks Questions 1. Explain in details about Structures and Unions? 2. Explain about copying and comparing structure variables with example. 3. Explain the following in detail with examples. a) Array of Structures b) Arrays within the structures c) Structures within the structures d) Structure Pointer 4. How structure values are passed to function? Explain the methods. 5. Design a structure student_record to contain name, DOB, total marks obtained. Develop a program to read data for 10 students in a class and list them rank-wise. 6. Explain the string handling function with examples. 7. Distinguish between the following functions. a) getc() and getchar() b) scanf() and fscanf() c) printf() and fprintf() d) feof() and ferror() 8. Write a program to copy the contents of one file into another. 9. Explain fread() and fwrite() with example program. 10. Explain the following file manipulation functions with examples. a) rename() b) freopen() c) remove() d) tmpfile(void), and e) fflush()

UNIT III 2 Marks Questions 1. Define Abstract Data Type. 2. What are the operations of ADT? 3. List out the areas in which Data Structures are applied extensively. 4. Define Non-linear Data Structure. 5. Distinguish between Linear and Non-Linear Data Structures. 6. What are the various operations done under the List ADT? 7. Mention the applications of List. 8. What is a Linked List? 9. What are the types of Linked List? 10. What is the need for the header? 11. Define Single Linked list. 12. Define Doubly Linked list. 13. Define Circular doubly Linked List? 14. Write down the steps to modify a Node in a Linked List. 15. Write the ways in which List ADT can be implemented. 16. List out the disadvantages of using a Linked List. 17. 17. State the difference between Arrays and Linked Lists. 18. 18. What is the advantage of Double Linked list over Single Linked list implementation? 19. 19. List out the advantage of Circular linked list. 20. 20. Write the find routine in array implementation of list.

16/10/8 Marks Questions 1. Explain the array implementation of list ADT with routine and example. (16) 2. What is a Linked List? Explain with suitable routine segments for any four Operations (16) 3. Explain the application of Linked list in detail. (16) 4. Explain Polynomial manipulation using Linked Lists with an example.(16) 5. Explain the different types of Linked Lists and its Implementation.(16) 6. Explain Doubly Linked List with an example.(16) 7. a. With a pseudo code explain how a node can be inserted at a user specified position in a Doubly Linked List (8) b. Sort the Following Elements Using Radix Sort. (8) 10, 8, 21, 125, 54,174,187,250,1,65 8. Write a routine to merge two arrays and traverse the array (16) 9. Explain the insertion and deletion operations in a circular single linked list with a routine and an example. (16) 10. Explain the insertion and deletion operations in a circular double linked list with routine and an example. (16)

UNIT IV 2 Marks Questions 1. Define a stack 2. List out the basic operations that can be performed on a stack 3. State the different ways of representing expressions 4. State the advantages of using infix notations. 5. State the advantages of using postfix notations. 6. State the rules to be followed during infix to postfix conversions 7. State the rules to be followed during infix to prefix conversions. 8. State the difference between stacks and linked lists 9. List the applications of stack 10. Write a routine to check whether the stack is full or empty. 11. Mention the advantages of representing stacks using linked lists than arrays 12. Write the equivalent prefix notation for infix expression p/q*r+s. 13. Define a queue 14. What are the types of queues? 15. Define circular queue 16. Define a priority queue 17. State the difference between queues and linked lists 18. Define a Deque 19. List the applications of queues 20. Write a routine to display the contents of queue.

16/10/8 Marks Questions 1. Explain the operations and the implementation of Stack ADT using Array. (16) 2. Explain the different operation that can be performed on Stacks? Write the algorithm for each operation. (16) 3. Explain the various application of stack? (Balanced parenthesis, Conversion, Evaluation, Recursion, etc). (16) 4. Explain the operations and the implementation of Stack ADT using Linked list. (16) 5. Convert the infix expression a+b^c+(d*e/f)*g to postfix expression and evaluate the same using stack. a=3, b=5, c=2, d=7, e=4, f=1, g=8 (16) 6. What is a queue? Write an algorithm to implement queue with example. (16) 7. Explain the operations and the implementation of Queue ADT using Array (16) 8. Explain the different types of queue. (16) 9. Explain the operations and the implementation of Queue ADT using Linked list. (16) 10. Explain Prefix, Infix and postfix expressions with an example.