This download link is referred from the post: VTU B.Tech 1st Year Last 10 Years 2011-2021 Question Papers
Firstranker's choice
18CPS13/23
--- Content provided by FirstRanker.com ---
USN
First/Second Semester
B.E. Degree Examination, Dec.2019/Jan.2020
C Programming for Problem Solving
Time: 3 hrs.
--- Content provided by FirstRanker.com ---
Max. Marks: 100
Note: Answer any FIVE full questions, choosing ONE full question from each module.
Module-1
- a. How would you explain the components of a computer with the block diagram? (08 Marks)
- b. Describe the types of computers. (06 Marks)
- c. Convert the following mathematical expression into C equivalent statements.
- i) m = x + x + (4x + 6) / k
- ii) x = (-b + √(b² - 4ac)) / 2a
- iii) Area = πr² + 2πrh
--- Content provided by FirstRanker.com ---
OR
--- Content provided by FirstRanker.com ---
- a. How can you write the basic structure of a C program? Explain with examples. (08 Marks)
- b. Define a token. Explain the different tokens available in C language. (08 Marks)
- c. How would you explain logical operator in a C language. (04 Marks)
Module-2
- a. With examples how would describe the formatted input and formatted output statements in C language. (08 Marks)
- b. How would you explain if else statement in C language? Give the relevant example. (06 Marks)
- c. Write a program in C to display the grade based on the marks as follows :
Marks Grades
0 to 39 F
40 to 49 E--- Content provided by FirstRanker.com ---
50 to 59 D
60 to 69 C
70 to 79 B
80 to 89 A
90 to 100 O (06 Marks)
--- Content provided by FirstRanker.com ---
--- Content provided by FirstRanker.com ---
OR
- a. How would you explain switch statement with an example? (08 Marks)
- b. How the while loop differs from do-while loop? (06 Marks)
- c. Write a program to check whether a given integer is palindrome or not? (06 Marks)
Module-3
--- Content provided by FirstRanker.com ---
- a. Define an array. How would you explain declaration and initialization of one dimensional array? (06 Marks)
- b. Write a program in C to implement binary searching technique. (06 Marks)
- c. How would you explain with examples, the string manipulation functions? (08 Marks)
OR
--- Content provided by FirstRanker.com ---
- a. Write a program to read N integers and to arrange them in ascending order using bubble sort technique. (06 Marks)
- b. How would you explain the declaration and initialization of string variables? (06 Marks)
- c. Write a program to multiply 2 matrices, by ensuring their multiplication compatibility. (08 Marks)
Module-4
- a. How would you illustrate the elements of user defined functions with examples? (10 Marks)
- b. Write a program in C to find the factorial of a given integer using functions. (05 Marks)
- c. Explain how call by value differs from call by reference while invoking a function. (05 Marks)
--- Content provided by FirstRanker.com ---
OR
- a. How would you explain the categories of user defined functions? (10 Marks)
- b. Write a program in C to compute the Fibonacci series up to n terms using recursion. (06 Marks)
- c. List the storage class specifiers. Explain any one of them. (04 Marks)
--- Content provided by FirstRanker.com ---
Module-5
- a. Define a structure. How would you declare and initialize structure variables? Give examples. (07 Marks)
- b. Define a Pointer. How the pointers are declared and initialized? (06 Marks)
- c. Write a C program to read details of 10 students and to print the marks of the student if his name is given as input. (07 Marks)
--- Content provided by FirstRanker.com ---
OR
- a. Write a program in C to add two numbers using pointers. (05 Marks)
- b. How would you explain the categories of preprocessor directives in C? (10 Marks)
- c. How would you explain nested structures? (05 Marks)
--- Content provided by FirstRanker.com ---
This download link is referred from the post: VTU B.Tech 1st Year Last 10 Years 2011-2021 Question Papers
--- Content provided by FirstRanker.com ---