0% found this document useful (0 votes)
135 views

Programming in C N20AE R15 2131

The document is a test paper for a diploma examination in engineering/technology/management/commercial practice. It contains 10 questions with parts A, B and C covering topics like operators, data types, arrays, functions, loops, pointers and structures in the C programming language.

Uploaded by

Sreekanth Ku
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
135 views

Programming in C N20AE R15 2131

The document is a test paper for a diploma examination in engineering/technology/management/commercial practice. It contains 10 questions with parts A, B and C covering topics like operators, data types, arrays, functions, loops, pointers and structures in the C programming language.

Uploaded by

Sreekanth Ku
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

TED (15) -2131 C19-00011 Reg.No………………..............

(Revision- 2015) Signature. .................................

DIPLOMA EXAMINATION IN ENGINEERING/TECHNOLOGY/MANAGEMENT/


COMMERCIAL PRACTICE – NOVEMBER -2020.
(ADDITIONAL EXAMINATION)

PROGRAMMING IN C

(Maximum Marks : 75) [Time : 2.15 hours]


PART–A
Marks

I. Answer any three questions in one or two sentences. Each question carries 2 marks.

1. Write the use of the operators = and = =.


2. List any two fundamental data types in C.
3. Give the general form of file inclusion.
4. Define an array.
5. Write the index where the alphabets ‘e’ and ‘o’ are placed in array ‘word’
in the following statement.
char word[ ] = “Hello”; (3x2=6)

PART - B
II Answer any four of the following questions . Each question carries 6 marks.

1. Describe the logical operators in C with example. Write the hierarchy of


logical operators.
2. Write a C program to check whether a given number is even or dd.
3. Explain the general form of a function definition.
4. Describe about preprocessors and macros with one example for each.
5. Describe about one-dimensional arrays.
6. Write a C program to find the sum of elements in an array.
7. Explain about strings along with declaration and initialization of string
variable with examples. [4x6 =24]
PART - C

(Answer any of the three units from the following. Each full question carries 15 marks)
UNIT I

III (a) Write a C program to display the numbers up to a given number in the descending

order and in the descending order using for loop. (9)


-2-

(b) Differentiate between break and continue statements with example. (6)

OR

IV (a) Write a C program to display the day name in a week when the user inputs
a number in the range 1 to 7 using switch-case statement.
(Hint:If input = 1 display the day as Sunday) (9)

(b) Explain while and do-while loop control structures with example. (6)

UNIT- II
V (a) Explain static and extern storage classes in C with example. (8)

(b) Write a C program to find the sum of numbers from 1 to N using recursion. (7)
OR

VI (a) Explain the argument passing methods in C. (8)

(b) Write a C program to find the sum of the digits in a number using function.
Display the result from the main function. (7)
UNIT- III

VII (a) Write a C program to display the elements of an integer array using pointer. (9)

(b) Explain how to pass array elements to a function. (6)


OR
VIII (a) Write a C program for matrix addition. (9)

(b) Explain about two-dimensional arrays. (6)


UNIT – IV
IX (a) Explain the standard library string functions strcpy(), strcat() and
Strcmp() with example. (9)

(b) Write a C program to display the length of a given string without


using library function. (6)
OR
X (a) Explain how to define a structure and access the members by defining a
structure named books with data as book id, title, author and subject. (9)

(b) Explain about array of structures with example. (6)

************

You might also like