0% found this document useful (0 votes)
2 views

Computer Prog_Compre

The document outlines the comprehensive examination pattern for the M. Tech (Software Engineering) program at Birla Institute of Technology & Science, Pilani. It includes details such as the course number, title, exam type, duration, and a list of questions covering various programming topics and tasks. The exam consists of 6 questions with a total weightage of 60 marks, and it is an open book exam lasting 3 hours.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Computer Prog_Compre

The document outlines the comprehensive examination pattern for the M. Tech (Software Engineering) program at Birla Institute of Technology & Science, Pilani. It includes details such as the course number, title, exam type, duration, and a list of questions covering various programming topics and tasks. The exam consists of 6 questions with a total weightage of 60 marks, and it is an open book exam lasting 3 hours.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Question Paper Pattern is NOT fixed.

The paper is for reference only

Birla Institute of Technology & Science, Pilani


Work Integrated Learning Programmes Division
M. Tech (Software Engineering) at Wipro Technologies (WASE)
Comprehensive Examination (Regular)

Course Number : SEWP ZC142


Course Title : COMPUTER PROGRAMMING
Type of Exam : Open Book No. of Pages: 3
No. of Questions: 6
Weightage : 60 Marks
Duration : 3 Hours
Date of Exam : Session: AN( 2 to 5 PM)
Q.No Question Marks

1a Consider the following declaration 1


int a, *b = &a, **c = &b;
What happens to the value of a on execution of the following program fragment?
a = 4;
**c = 5;
Explain your answer

1b Write the output of the following code with explanation 1


void main()
{
double * p1, p2;
printf ("%d .. %d", sizeof(p1), sizeof(p2));
}

1c We have the following array: 1

47 3 66 32 56 92

After two passes of a sorting algorithm, the array has been rearranged as shown
below:

3 47 66 32 56 92. Name the Algorithm and show the steps

1d Write a c program to find total size of a file using ftell and fseek functions 4

1e Write a function HasZeroDiagonal that, given a 5-by-5 integer array, returns 1 if all 3
the elements on the main array diagonal are zero and returns 0 otherwise.

2a Write a C program to calculate and display the sum of the contents of an array using 5
pointer arithmetic.

2b Write a a function to reverse the links in a linked list such that the last node becomes 5
the first and the first becomes the last by traversing the linked list only once

3a Write a program to increment one second to current time 5

Page 1 of 3
Question Paper Pattern is NOT fixed. The paper is for reference only

3b Write a C program to delete(remove) all duplicate integer values from an array .After 5
performing delete operation the array should only contain unique integer value.
Example:
If elements of array are: 10, 20, 10, 1, 100, 10, 2, 1, 5, 10
After removing all duplicate elements
Elements of array are: 10, 20, 1, 100, 2, 5

4 Write a Program for Circular Queue implementation Using Array 10

5a Write a C program to read elements in a matrix and revelry arrange (interchange) 6


elements of primary(major) diagonal with secondary(minor) diagonal.

Example: If elements of matrix are:


123
456
789
Matrix after interchanging its diagonal:
321
456
987

5b Write a C program using structure to find student grades in a class. 4


Assumptions:
Maximum total marks is 500.
Student_percentage Grades
>=80 A
>=60 B
>=50 C
>=40 D
< 40 F

6a Write a C program to reverse the first n characters in a file. 6

6b Consider a currency system in which there are notes of seven denominations, 4


namely, Rs. 1, Rs. 2, Rs. 5, Rs. 10, Rs. 50, Rs. 100.
If the sum of Rs. N is input, write a program in C to compute smallest number of
notes that will combine to give Rs. N.

Conditions: 1 ≤ T ≤ 100
1 ≤ N ≤ 10000

Inputs: The first line contains an integer T, total number of testcases. Then
follow T lines, each line contains an integer N.

Output: Display the smallest number of notes that will combine to give N.

Page 2 of 3
Question Paper Pattern is NOT fixed. The paper is for reference only

Example:

Input
3
1200
500
242

Output
12
5
7

XXXXXX

Page 3 of 3

You might also like