Lords Institute of Engineering and Technology Programming for Problem Solving (PPS) UNIT I Important Questions Sno Question 1 Explain the components of a computer with a neat block diagram. 2 Explain the various steps involved in executing a C Program. 3 What is an Algorithm? What are the properties of an Algorithm 4 5 What are the advantages and disadvantages of an Algorithm What is a Flow chart? Explain the different types of symbols used in a flow chart? Write short note on Pseudo code. Differentiate between Flow chart and Algorithm. What is a variable. What are different types of variables. Give the rules for variable declaration. Name the different data types that support C Language and explain them in detail. Write short notes on Syntax and Logical Errors. Explain the difference between Object and Executable code. 6 7 8 9 10 11 UNIT II Sno Question 1 What is meant by Operator Precedence? 2 Explain different Decision Making ( Conditional Branching) Statements in C? ( Hint IF , IF-ELSE,NESTED IF , ELSE IF LADDER, SWITCH) Explain One Dimensional array with syntax ( Declaration and Initialization) Explain Two Dimensional Array with syntax( Declaration and Initialization) What is a String? List string handling functions along with syntax. Explain different Operators in C Language? (8 Operators with symbols and examples you have to write. a) Arithmetic b)Assignment c) Logical d) Relational e) Ternary f) Bitwise g) Special h) Explain the following statements a) Continue b) break c) goto Explain various looping statements in C Language( Hint for loop,while loop and do while loop) write syntax and flow chart. Explain how to pass an Array to a function What is a Character Array? How they are declared. Explain how two-dimensional arrays can be used to represent matrices. Write a C code to perform Matrix addition and Matrix Multiplication 3 4 5 6 7 8 9 10 11 UNIT III Sno Question 1 Write an Algorithm for Linear Search 2 Write an program for Linear Search 3 Write an Algorithm/Program for Binary Search 4 5 6 7 8 Write an Algorithm/Program for Bubbles sort Write an Algorithm/Program for Selection Sort Write a program to find the roots of a Quadratic Equation. What is a function? Explain the elements of a function Give the structure of a function and explain about the arguments and their return values. What are standard library functions? Illustrate with suitable examples. Explain in detail about passing parameters to a function. ( Hint: Call by Value and Call by Reference) Explain how arrays are passed to a function with an example. 9 10 11 UNIT IV Sno Question 1 Define Recursion? What are the advantages of Recursion? 2 3 4 5 6 7 8 9 10 Define Structure? What are the advantages of Structure? How do you declare and initialize a structure? Explain the concepts of Array of structures? Explain the sizeof() Write a C Program to find the factorial using recursion? Write a C Program to find the GCD using recursion? Write a C Program to find the Fibonacci series using recursion? Write a C Program to find the Binary Search using recursion? Programs on Structures and Array of Structures ( Examples like student structure, Employee) UNIT V Sno Question 1 Define a Pointer ? What are the advantages of pointers 2 What is an Indirection Operator? 3 What are Pointer Constants, Pointer Values and Pointer Variables 4 5 6 Explain Self Referential Structures. Explain the Notion of Linked Lists Explain the process of accessing a variable through its pointers? Give example Describe various types of files with example. Explain stream functions (input – output) functions for files. 7 8 9 10 11 12 Explain syntax for opening a file with various modes and closing a file Explain about random access files (rewind(),ftell(),fseek() ) functions. Write a program to copy the contents of one file to another Write a program to count number of characters,words and lines in a give file