You are on page 1of 3

Register Number

SATHYABAMA UNIVERSITY
(Established under section 3 of UGC Act,1956)

Course & Branch :B.E/B.Tech COMMON TO ALL BRANCHES


Title of the Paper :Programming in C
Max. Marks :80
Sub. Code :5ET206-5ET115-6C0007
Time : 3 Hours
Date :31/05/2011
Session :AN
______________________________________________________________________________________________________________________

1.

PART - A
Answer ALL the Questions
Write a note on data type qualifiers.

(10 x 2 = 20)

2.

How can the value of an expression be converted to a different


data type? What is this called?

3.

Write the difference between break and continue statements.

4.

Write the purpose of looping statements. Give an examples.

5.

Find the output of the following program:


#include < stdio.h >
void main ( )
{
int
arr [4] [4] = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,}
int i,j;
for (i = 2; i >=0; i--)
for (j = 2; j >=0; j--)

6.

printf(%d, arr [i]);


}
Write the advantages of function.

7.

Write the significance of pointer.

8.

Describe the output of the following program:


void main ( )
{
int count = 10, *temp, sum =0;
temp = & count;
*temp = 20
temp = &sum;
*temp= count;
printf( %d %d %d ,count, *temp, sum);

9.

Define: File pointer

10. How will you identify the end of file?


PART B
Answer All the Questions

(5 x 12 = 60)

11. State the principles of structured programming. Write the


techniques to convert unstructured programming into structured
form.
(or)
12. (a) Discuss the difference between top down and bottom up
design.
(4)
(b) Briefly discuss about priority of C operators.
(8)
13. Describe about the various control statements in C.
(or)
14. Discuss about the various inputs and output Statement of C.
15. (a) Write a C program to reverse the given string.
(4)
(b) Write a C program to find the sorted order of N elements
using functions.
(8)
(or)

16. Discuss about the storage Classes of variable used in C.


17. Write a C program to generate pay bill for N employees using
pointer to structure. Allocate and deallocate memory locations to
store employee structures dynamically.
(or)
18. (a) Write the difference between Union and Structure. (4)
(b) struct { int a;
long b;
}s:
union
{ int a;
long b;
}u;
What is the value of size of (s) and size of (u) if size of
(int) = 2 and size of (long) = 4?
(2)
(c) How can the structure be passed as value and reference
parameters to function?
(6)
19. (a) Write a C program to create a text file and print the number of
words and vowels of that file.
(b) Discuss about the command line arguments with an example.
(or)
20. List out the built in functions of FILE.H to access sequential
and random access file.

You might also like