Register Number
|
|
|
|
|
|
|
|
(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:
4ET115/5ET115/6C0007/5ET206 (2006/07/08/09)
Time: 3 Hours
Date: 08/12/2010 Session:
FN
______________________________________________________________________________________________________________________
PART
- A (10 X 2 = 20)
Answer ALL the Questions
1. Write the characteristics of Structured
Programming Languages.
2. How do constants differ from variables?
3. char s[20] =” Programming in C”;
scanf(“%s”,s);
gets(s);
What will be the output of this program
segment?
4. When can break and continue be used?
5. What is an index and why does it have to be
unique?
6. Define
recursion.
7. What is the use of ‘*’ and ‘->’
operators in pointers?
8. How is a structure different from an array?
9. What
is a file?
10. Mention
the use of fprintf and fscanf.
PART – B (5
x 12 = 60)
Answer All the Questions
1. (a) What is meant by flowchart? Explain the
symbols used for
drawing a flowchart.
drawing a flowchart.
(b) Write the structure of a C program. Explain
it with an
example program.
example program.
(or)
12. Explain
the various types of operators available with a sample program for each type.
13. (a) Give the syntax of scanf ( ) and printf ( )
and explain their
usage in C language.
usage in C language.
(b) Write a C program to accept numbers from the
user until
their sum exceeds 50.
their sum exceeds 50.
(or)
14. Write
a C program to find the roots of a quadratic equation. Use switch case.
15. (a) Write
a C program to find the transpose of a matrix.
(b) Assume
s1 =” Welcome” s2=”hai”.
Write a C program to (i) find
the length of s1.
(ii) copy to another string s3
(iii) compare s1 with s2
(or)
16. List
the different storage classes available in C. Explain each of them in detail.
17. (a) Write a C program to swap two numbers using
pointers and
without using pointers.
without using pointers.
(b) How can an array of pointers be accessed?
With an example
program, explain in detail.
program, explain in detail.
(or)
18. Write
a structure with following members: student name, student roll no, three
subjects marks, total, percentage. Find the sum and percentage of marks for 10
students.
19. Explain the
steps that are followed while accessing a file.
(or)
20. Explain
how random access is done in a file.
0 comments:
Pen down your valuable important comments below