0% found this document useful (0 votes)
65 views4 pages

22218-C-Programming-Language-sample-question-paper

C

Uploaded by

Ajinkya Pawar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
65 views4 pages

22218-C-Programming-Language-sample-question-paper

C

Uploaded by

Ajinkya Pawar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 4

Scheme – I

Sample Question Paper


Program Name : Diploma in Electronics Engineering Program Group
Program Code : EJ/DE/ET/EN/EX
Semester
Course Title
: Second
: 'C' Programming Language
22218
Max. Marks : 70 Time: 3 Hrs.

Instructions:
(1) All questions are compulsory.
(2) Illustrate your answers with neat sketches wherever necessary.
(3) Figures to the right indicate full marks.
(4) Assume suitable data if necessary.
(5) Preferably, write the answers in sequential order

Q.1) Attempt any FIVE of the following. 10 Marks


A) Define the term (i) identifier (ii) token.
B) State the use of break and continue statement.
C) State two differences between while loop and do while loop.
D) State the advantage of function.
E) Define pointers in C.
F) State any four features of pointer.
G) Define structure.
Q.2) Attempt any THREE of the following. 12 Marks
A) Distinguish between variable and constant.
B) Describe use of for loop with syntax and flowchart.
C) Define array. How array is declared write its syntax?
D) Explain recursion with example.
Q.3) Attempt any THREE of the following. 12 Marks
A) Enlist any four types of arithmetic operators used in C and give one example of
each.
B) Explain declaration and initialization of one-dimensional array with example.
C) Explain meaning of following statement with reference to pointers. int * a, b;
b = 20;
*a = b;
a = &b;
D) Explain how structure can be initialized with suitable example.
Q.4) Attempt any THREE of the following. 12 Marks
A) Write a program in ‘C’ to display hexadecimal, decimal, octal format of the entered
number.
B) Write a C program to convert a temperature of 600 C to the Fahrenheit scale using
the relationship F = (9/5)* C +32
C) Explain any four string handling functions from standard library function..
D) Write a ‘c’ program to add two numbers using pointers

Q.5) Attempt any TWO of the following. 12 Marks

A) Explain how ‘switch’ statement is used in the programs instead of ‘if-else’


statements with a suitable example program.
B) Write a C program to count the number of characters and print the vowels present
in entered text.
C) Write a C program to swap contents of two variables using call by reference.

Q.6) Attempt any TWO of the following. 12 Marks


A) Write a C program to search a particular roll no. in an array. If that roll no. exist in
an array print “number is present" else print “number is absent".
B) Write a C program to find factorial of given number using recursion function.
C) Write a program to declare structure book having data member as book_name, book_id,
book_price. Accept this data for 3 books and display it.
Scheme – I
Sample Test Paper - I
Program Name : Diploma in Electronics Engineering Program Group
Program Code : EJ/DE/ET/EN/EX
Semester
Course Title
: Second
: 'C' Programming Language
22218
Max. Marks : 20 Time: 1 Hour

Instructions: All questions are compulsory


1. Illustrate your answers with neat sketches wherever necessary
2. Figures to the right indicate full marks
3. Assume suitable data if necessary
4. Preferably, write the answers in sequential order
Q1. Attempt any Four (2*4=08)
1. Define token and identifier.
2. Explain use of for loop with syntax and flow chart.
3. List any two library functions with syntax.
4. Write the syntax of else if-ladder.
5. Write syntax of switch case.
6. Write a program to find the sum of digit of an integer
(Sum = 1 + 4 + 5 + 3 + 2 = 15)

Q2. Attempt any Three (3*4=12)


1. Write a program to demonstrate the use of printf and scanf statement to read and
print values of variables of different data types.
2. Write a program to determine whether a person is eligible to vote.
3. Write a program that displays the size of every data type.
4. Write use of comma operator in ‘for ‘loop.
5. Identify situation will you prefer to use while, do-while loop.
6. Write algorithm and draw flowchart to print prime numbers between 1 to 100.
7. Write a program to print following pattern.
1 1 1
2 2
3
Scheme - I
Sample Test Paper - II
Program Name : Diploma in Electronics Engineering Program Group
Program Code : EJ/DE/ET/EN/EX
Semester
Course Title
: Second
: 'C' Programming Language
22218
Max. Marks : 20 Time: 1 Hour

Instructions: All questions are compulsory


1. Illustrate your answers with neat sketches wherever necessary
2. Figures to the right indicate full marks
3. Assume suitable data if necessary
4. Preferably, write the answers in sequential order

Q1. Attempt any Four (2*4=08)


1. Clarify the situation: when a function returns a value that does not match with the
return type of function?
2. State any four advantages of function.
3. State the difference between one dimensional and two dimensional arrays.
4. Write advantages of pointer.
5. Write the syntax for structure.
6. Give an example of enumerated data type with syntax.

Q2. Attempt any Three (3*4=12)


1. Write types of parameter passing methods in function and give one example of each.
2. Write a program to convert the given string "Hello" to "olleH" using recursion
3. Write a program to read, display the information about employees using structure.
4. Differentiate between * (arr+i) and (arr+i).
5. Write C Program for following string function.
 strrev( )
 strlen( )

You might also like