RAWAL INSTITUTE OF ENGINEERING & TECHNOLOGY, FARIDABAD
SESSION: 2023-2024
PPS (Module)
Course: [Link]. (ME/CE/ECE)- II SEM
Part-A
Q1. List the rules of constructing variables in C language.
Q2. Draw a flowchart to find largest among three numbers.
Q3. Show how continue statement is used in a C program, with example.
Q4. Define dangling else problem.
Q5. Define string with example. How string is declared and initialized? How they are
different from arrays?
Q6. Differentiate between user defined and built in library functions.
Q7. Define ternary operator with the help of suitable examples.
Q8. Discuss static storage class with a suitable example.
Q9. Differentiate between:
i) Compiler & Interpreter
ii) Linker & Loader
iii) Machine Language & Assemble Language
iv) Compiler, Interpreter and Assembler
v) RAM & ROM
vi) High Level language & Low level Language
vii) Algorithm & Flowchart
viii) Syntax Errors & Semantic Errors
ix) Logical Operator & Relational Operator
x) Local Variable & Global variable
xi) Break & Exit statement & Continue statement
xii) Program & Algorithm
xiii) Primitive & Non-Primitive Data Types
xiv) While & Do-While Loops
xv) getchar and putchar
xvi) Structure & Union
xvii) Pointers and Double Pointers
Q10. Define Operating System. List out its goals and functions.
Q11. Define Registers.
Q12. What are keywords? Explain with example.
Q13. What are the usage of goto and continue instructions in C?
Q14. Name and define any two categories of errors in a program.
Q15. What are data types? Name the different data types available in C.
Q16. Define Pointer with syntax and proper example.
Q17. What do you mean by sorting? Name any two sorting techniques.
Q18. What is function prototype?
Q19. Write the function of gets() and puts() commands in strings.
Q20. Define Recursion with syntax and example.
Q21. Write the syntax for fopen and fclose commands in C file system.
Q22. Define Linked List.
Q23. What is the purpose of break statement?
Q24. What is: ‘/0’; ‘/n’; ‘/t’?
Q25. Which is better: switch-case or nested if-else?
Q26. Describe working of linear search in brief.
Q27. Can we have two return statements in a function?
Q28. What is the role of Header Files?
Q29. Define type casting with example.
Q30. Write the output of the following programs:
i) main()
{
int x=5, *a;
a=&x;
printf(“%d”, x++);
getch();
}
ii) main()
{
int x=5, *p;
p=&x;
x=x+1;
printf(“%d”, *p);
getch();
}
Q31. Write the complexity of:
i) selection Sort
ii) Bubble Sort
iii) Insertion Sort
iv) Binary Search
v) Linear Search
Q32. How iteration is different from recursion?
Q33. Write a program to check if number is even or odd.
Q34. Define computer. List some advantages and disadvantages of computer.
Q35. List any four file handling functions.
Q36. What are Input and output Devices? List any four input and output devices.
Q37. Write the function of rewind(), fseek(), ftell().
Q38. Explain Switch statement with syntax.
Q39. Write a program to find factorial of a given number.
Q40. Define Arrays with example.
Q41. How to declare and Initialize 1-D and 2-D Array?
Q42. What is a compiler?
Q43. What are the features of a good algorithm?
Q44. Explain the idea of structures in brief.
Q45. What are unary operators?
Q46. What do you mean by time complexity?
Part-B
Q1. Write Algorithm, Flow Chart and Program to:
i) To perform arithmetic operations.
ii) To find reverse of an integer number and check whether it is palindrome or not.
iii) To generate simple calculator using switch case.
iv) To check whether a year entered by user is leap or not.
v) To find factorial of a given number using loops.
vi) To generate table of number ‘n’ being entered by user.
vii) To print number from 1 to 9 and their square.
viii) To reads ‘n’ integer numbers and arranges them in ascending order using selection
sort.
ix) To implement insertion sort.
x) To implement bubble sort.
xi) To implement linear search.
xii) To implement binary search.
xiii) For finding the roots for quadratic equation.
xiv) To implement call by value and call by reference function.
xv) To find factorial of a given number using recursion.
xvi) To print Fibonacci series up to nth term using recursion.
xvii) To maintain a record of ‘n’ employees detail using an array of structure with three
fields (id, name, salary) and print the details of employees whose salary is above
5000.
xviii) To find the sum and mean of all numbers in an array using pointer.
xix) To explain the process of writing the data to a text file.
xx) To find the largest among three given numbers.
xxi) WAP to print the pattern:
*
**
***
****
*****
xxii) To accepts two integers and compute their sum via addnums().
xxiii) To calculate length of a string without using string inbuilt functions.
xxiv) To find the sum of two matrices A and B in third matrix C.
xxv) To find the product of two matrices A and B in third matrix C.
xxvi) To compute mean and medium using arrays.
xxvii) To search an element from an array and displays its position.
xxviii) To count the number of vowels in a string without using inbuilt function.
xxix) To print the upper and lower triangle of matrix along with the sum of their
elements.
xxx) To copy the content of one file to another.
xxxi) To find the largest of three numbers.
xxxii) To find grades of a student using switch case.
xxxiii) To swap two numbers using functions.
xxxiv) To implement string operations.
Q2. Explain switch case with example.
Q3. Explain all types of loops available in C with their syntax.
Q4. What is Data Type? Explain different data type in detail with example.
Q5. What are different iterative statements in C? Write example codes for all the iterative
statements.
Q6. Explain different manipulation library functions with example.
Q7. What do you mean by Array? Explain 1-D and 2-D arrays with declaration and
Initialization syntax.
Q8. Write each steps of sorting the given array using selection sort 5,20,25,20,18,12,8,1,30.
Q9. Explain function with proper example. Also explain parameter passing mechanism.
Q10. Define Recursion. Explain with proper example.
Q11. What is structure? Explain the syntax of structure declaration with example.
Q12. Explain self-referential structure using pointers and also implement single linked list
representation using the same.
Q13. Define pointer with suitable syntax and example.
Q14. Differentiate between text file and binary files.
Q15. Define file handling. Explain various operations performed on files with the help of
suitable example.
Q16. Write short notes on linker and loader.
Q17. What is operating system? Write some important functions of an operating system.
Q18. Differentiate between arrays and structures. Write a program to store the information of
students using structures.
Q19. Explain the steps for sorting the given array using bubble sort, selection sort, insertion
sort: 5, 7, 10, 2, 13, 9, 18, 15