Reg18 Programming in C Jun-Jul2021
Reg18 Programming in C Jun-Jul2021
:
B.E. / B.TECH. DEGREE EXAMINATIONS : JUNE / JULY 2021
CIVIL / EEE / ECE / EIE / CSE / IT / IBT BRANCHES
18CES204 / 18EES104 / 18LES104 / 18NES104 / 18SES104 / 18IES104 / 18BES204
PROGRAMMING IN C
TIME : 3 HOURS MAX. MARKS : 100
ANSWER ALL QUESTIONS
PART – A (10 X 2 = 20)
1. Why algorithm is needed before writing programs?
2. Mention the use of linker.
3. Give the use of #define.
4. Write down the conversion characters of printf().
5. State the general form of function definition.
6. Specify the scope rules in C.
7. What is meant by command line argument?
8 Define mask in C.
9 Distinguish between structure and union.
10 What is fscanf() and sscanf()?
PART – B (5 X 16 = 80)
(QUESTION NO. 11 IS COMPULSORY)
11. (a) Create a structure that describes a restaurant. It should have members that (8)
include the name, address, average cost and type of food. Write a routine
that points out all restaurants of a given food type in order of cost, with the
least cost first.
(b) Write a program in C to double space a file. (8)
12. (a) Discuss about type conversion and type cast with an example. (8)
(b) Tabulate the data types and special characters used in C. (8)
(OR)
13. (a) Give a brief account on C operators, their precedence and associativity. (8)
(b) With an example program, write about the while statement. (8)
…2…
Q.CODE : 181124
-2-
(OR)
15. Explain in detail about the various string handling functions used in C. (16)
16. (a) Enumerate the salient features of ragged arrays with an example. (8)
(b) Explain array of pointers with an example. (8)
(OR)
17. (a) Give a brief account on type definitions and macros in stddef.h. (8)
(b) Describe the concept of conditional compilation. (8)
18. (a) With a neat sketch, describe the anatomy of a computer. (8)
(b) Summarize the evolution and classification of computer. (8)
(OR)
19. (a) Explain the process how a program gives output after reading input from (8)
the user.
(b) What is OS? Write briefly about different kind of OS. (8)
------------