Name of the Organisation : Institute Of Aeronautical Engineering
Exam : B.Tech Semester Examinations
Subject : C Programming
Semester : 2
Document Type : Previous Question Paper
Website : https://www.iare.ac.in
B.Tech Semester II C Programming Question Papers
Institute Of Aeronautical Engineering (IARE) B.Tech C Programming Previous Question Paper Semester II for the year 2021.
Related / Similar Question Paper : iare.ac.in B.Tech Engineering Mechanics Semester II Question Paper
B.Tech Semester II C Programming Questions
MODULE – I
1. (a) Describe the four basic data types with examples. How could we extend the range of values they represent? [7M]
(b) The policy followed by a company to process customer orders is given by the following rules:
i) If a customer order is less than or equal to that in stock and his credit is OK, supply his
requirement.
ii) If his credit is not OK do not supply. Send him an intimation.
iii) If the credit is OK but the item in stock is less than his order,supply what is in stock.
Write an algorithm to implement the company policy. [7M]
MODULE – II
2. (a) List the loop control statements in C. Differentiate between while() and do-while() statements. [7M]
(b) The grading in an academic institution is done according to the following rules:
Average Marks Grade
80 to 100 Honours
60 to 79 First Division
50 to 59 Second Division
40 to 49 Third Division
0 to 39 Fail
Implement this program using if–else ladder. [7M]
MODULE – III
3. (a) What is dynamic memory allocation? Explain the functions of malloc(), calloc() & free(). [7M]
(b) Write a C program to read a list of integers and store it in a single dimensional array. Find the second largest and second smallest element in that array? Hint: a[10] = {25, 41, 36, 78, 64, 50, 42, 86, 56, 100} second largest element: 86 and second smallest element: 36 [7M]
4. (a) Write the importance of recursion in programming languages. Differentiate between call by value and call by reference. [7M]
(b) A company CEO is very curious on lucky numbers. One day he decided to know the all employees lucky numbers. A lucky number is calculate using date of birth.
Lucky Number:
Date of Birth (DDMMYYYY)- 31081988
Find sum of all digits of given DoB
Repeat step2 until the DOB turned into single digit
For Example:
i) 31081988 = 3+1+0+8+1+9+8+8 =38
ii) 38 = 3+8 =11
iii) 11 = 1+1=2
iv) 2 is the lucky number.
Please help the CEO to find the lucky number by developing the C function.
Find lucky Number() function take the string as argument and return the lucky number. [7M]
MODULE – IV
5. (a) How do you declare, initialize and access a structure containing arrays? Differentiate between structure and union. [7M]
(b) Given a string, S, of length N that is indexed from 0 to N-1, print its even-indexed and odd- indexed characters as 2 space-separated strings on a single line.
Note: 0 is considered to be an even index. if S is 1a2b3c then it must print 123 abc. [7M]
6. (a) Describe the two ways of accessing a structure member through a pointer. Give an example. [7M]
(b) You are transporting some boxes through a tunnel, where each box is a parallelepiped, and is characterized by its length, width and height.
The height of the tunnel 41 feet and the width can be assumed to be infinite. A box can be carried through the tunnel only if its height is strictly less than the tunnel’s height.
Find the volume of each box that can be successfully transported to the other end of the tunnel.
Note: Boxes cannot be rotated.
Input Format
The first line contains a single integer n, denoting the n number of boxes. lines follow with three integers on each separated by single spaces length, width and height . [7M]
MODULE – V
7. (a) Illustrate the purpose of feof() & ferror() functions? Also explain the general format of fseek() function. [7M]
(b) Create an employee file employee.txt and write 5 records having employee name, designation, salary, branch and city. Develop a C program to display the contents of employee.txt file. [7M]
8. (a) What is a file pointer? Explain various text file opening modes with examples. [7M]
(b) Create a studentolddata.txt file containing student name, roll no, branch, section, address. Develop a C program to copy the contents of studentolddata.txt file toanother file studentnew- data.txt.
Download B.Tech C Programming Question Paper
Download B.Tech Semester II C Programming Question Paper Here :
https://www.pdfquestion.in/uploads/pdf2022/iaresem2cp.pdf