R10 CP Set 2
R10 CP Set 2
A 10
Code No: 101IT01 B. TECH. I Year I Semester Examinations, February, 2011 (Regular) COMPUTER PROGRAMMING (Common to CSE, IT & ME) Time: 3 Hours Max. Marks : 70
Page 1 of 2
Part B Max. Marks: 50 ANSWER ANY FIVE QUESTIONS. EACH QUESTION CARRIES 10 MARKS.
1. (a) (b) 2. 3. What is a structure within structure? Give an example. How are structure elements stored in memory? [5M] [5M] [ 10 M ]
Write a C program to arrange the given numbers in ascending order using pointers. [ 10 M ] [2M]
4.
(a) (b)
Give the structure of the functions and explain about the arguments and [ 8 M ] their return values.
5.
(a)
Explain the following and illustrate it with an example each. (i) Increment and decrement operator (ii) Conditional operator
[5M]
(b)
State the rules that apply while evaluating expression in automatic type Conversion.
[5M]
6.
(a) (b)
Write an algorithm to find the roots of quadratic equation for all the cases. [ 5 M ] Write about space requirements for variables of different data types. [5M] [ 10 M ] [5M] [5M]
7. 8.
Write a C program that uses a function to sort an array of integers. (a) (b) Distinguish between getchar and scanf functions for reading strings. Write a C program to print the Pascal's triangle.
Page 2 of 2