Sie sind auf Seite 1von 2

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY, HYDERABAD

END EXAMINATION MODEL QUESTION PAPER FOR R-13 REGULATION


B.Tech I Year Examinations

COMPUTER PROGRAMMING
(Common to all Branches)
Time: 3 hours

Max. Marks: 75

PART A (Answer all the Questions)


5 x 2 = 10 Marks
1. a) What is central processing unit? What are its major roles?

(2M)

b) How is a one dimensional array declared and initialized?

(2M)

c) Explain how strings are declared and initialized in C.

(2M)

d) Define union. Give the general template for union.

(2M)

e) List out the applications of stack and queue.

(2M)
5 x 3 = 15 Marks

f) Explain the only ternary operator available in C with example.

(3M)

g) Differentiate between call-by-value and call-by-reference.

(3M)

h) Write a program to show that pointer of any data type occupies same space.

(3M)

i) Explain the possible modes of opening files? In all these modes what happens
when the file doesnt exist and the file already exists?

(3M)

j) Discuss binary search algorithm with example.

(3M)

PART-B (Answer either a or b from each question, but not both)


5 x 10 = 50 Marks
2. a) i) Briefly discuss various computing environments with neat diagrams.
ii) List out the symbols used in flowcharts.

(7M)
(3M)

(OR)
b) i. What is the difference between break and continue statements? Explain with
example.

(4M)

ii. Write an algorithm and program to find the average of even numbers between 1
and n.

(6M)

3. a) i. Define scope and lifetime.

(2M)

ii. Write short notes on storage classes.

(8M)

(OR)
b) i. Write a C program to find the factorial of a number using recursion.
ii. Write a C program to add two matrices.

(5M)
(5M)

4. a) i. Write a C function to convert the string passed as an argument to its uppercase


equivalent.

(6M)

ii. Explain the concept of void pointers with examples.

(4M)

(OR)
b) i. Explain with suitable examples the dynamic memory allocation functions
available in C.

(4M)

ii. Write a C program to find whether a given string is palindrome or not.

(6M)

5. a) Write a C program that defines a structure student to contain name, HTNO, branch
and define the nested structure marks with member subject1, subject2, subject3 and
total. Define three functions where one function sums the marks in subject1, subject2
and subject 3 and places the sum in the total. The second function is used to display
the details of the students with marks. The third function is used to display the details
according to the ascending order of marks.

(10M)

(OR)
b) i. Write a program in C that reads the name of a file and displays the contents of
the file on the user screen in reverse.
ii. Why we cannot use relation and logical operators in structure variable?
6. a) i. Write a C program for selection sort using functions.
ii. What is a doubly linked list? What is the advantage over singly linked list?

(8M)
(2M)
(7M)
(3M)

(OR)
b) i. Write a C program to implement the operations of stack using linked list.
ii. Discuss the time complexities of different search techniques.

@@@@@
[This is sample paper only]

(7M)
(3M)