Anna University Coimbatore 2009 B.E Electrical and Electronics Engineering Programming in C - Question Paper
B.E. / B.TECH. DEGREE EXAMINATIONS : APRIL / MAY 2009
EEE / EIE BRANCHES 08E206 / 08N206 : PROGRAMMING IN C
TIME : 3 HOURS MAX. MARKS : 100
ANSWER ALL QUESTIONS
1. What is the use of symbolic constants? Write its general syntax for defining it.
2. Write the syntax of the scanf() function. What are the important points to be kept in mind while using this function?
3. Compare the switch-case structure with if-else structure. Which is more convenient? Give suitable example.
4. What do you mean by dynamic array?
5. What is recursion? Give an example.
6. What are the uses of union data type? How will you access and process the individual members in a union?
7. What are the different modes of files?
8. Write the syntax for declaring, initializing and accessing pointer variables.
9. Distinguish between a local variable and a global variable with suitable example.
10. What is a preprocessor? What is its use?
_. . . DAPT B .
(5x16 = 80)
11. What does data type refers to? Explain the primitive and derived data types with the amount of memory occupied by the various data types. (16)
v
(OR)
12. (a) Write a program to sort the given list of numbers in descending order. (6)
(b) Give the general formats of the possible types of assignments in C. (2)
(c) What does a cast operator mean? What is its function in programming?
What is its precedence and associativity? What is the result of each of the following?
(float)5/3, (float)(5/3), (float)1+1/3, (float)(1-1/3) (8)
13. (a) What are the ways in which a string input is read in C? Explain. (8)
(b) Define an array. How are one dimensional and two dimensional array elements initialized, read and written? Is it possible to have negative indices? (8)
(OR)
14. (a) Classify the control constructs in C and explain each with appropriate
syntax and example. (10)
(b) List out the various string handling functions available in C with its
purpose and syntax. (6)
' 2..
v/
Attachment: |
Earning: Approval pending. |