B.Tech I Semester (R20) Regular Examinations
Course Name: Programming for Problem Solving
Time: 3 hours
Max. Marks: 70
Note: Answer all FIVE questions. All questions carry equal marks.
1. a) Define Algorithm. Explain the characteristics of a good algorithm.
b) Draw a flowchart to find the largest of three numbers.
(OR)
2. a) What are the different types of operators available in C? Explain with examples.
b) Explain the structure of a C program with an example.
3. a) Write a C program to check whether the given number is prime or not.
b) Explain about different types of loops available in C with suitable examples.
(OR)
4. a) Write a C program to generate the Fibonacci series up to a given number ‘n’.
b) Explain different types of conditional statements available in C with suitable examples.
5. a) Define an array. Explain different types of arrays with examples.
b) Write a C program to sort the elements of an array in ascending order.
(OR)
6. a) What is a string? Explain different string manipulation functions with examples.
b) Write a C program to check whether the given string is palindrome or not.
7. a) What is a function? Explain different types of user-defined functions with examples.
b) Write a C program to calculate the factorial of a number using recursion.
(OR)
--- Content provided by FirstRanker.com ---
8. a) What are formal and actual arguments? Explain the concept of call by value and call by reference with examples.
b) Write a C program to swap two numbers using pointers.
9. a) What is a structure? How to declare and initialize a structure? Explain with an example.
b) Explain the difference between structures and unions.
(OR)
10. a) Explain different file handling functions in C with examples.
b) Write a C program to copy the contents of one file to another file.
WWW.FirstRanker.com
WWW.FirstRanker.com
--- Content provided by FirstRanker.com ---