BLDEA’s
V. P. Dr. P. G. Halakatti College of Engineering & Technology, Vijayapura 586103
Department of Computer Science & Engineering [AI & ML]
Subject: Programming in C (1BEIT105/205) Class: Ist Sem.
Module-1 Assignment Questions
Sl No Questions RBTL Marks
1. With suitable example - Explain the basic structure of C program. L2 10M
Explain the basic structure of C program with syntax in detail. Write a
2. sample program to demonstrate the components in the structure of a C L2,L3 10M
Program.
3. With a neat diagram explain the steps in the execution of C program. L1 10M
4. What are C tokens? List and discuss in brief. L2 10M
5. Define variable. Explain the rules to declare a variable with example. L2 6M
What is a variable? Explain rules for constructing variable in C. Give
6. L2 6M
examples for valid and invalid variable.
7. What are the basic datatypes available in C? L2 6M
Explain the following operators in C:
8. L2 8M
i) Relational ii) Logical iii) Conditional iv) Bitwise
Explain any five types of operators in C language with the illustrative
9. L2 10M
examples.
10. Explain the various operators in C. L2 10M
11. Describe different types of storage classes in with examples. L2 8M
Write algorithm and draw flowchart for following.
a. To calculate simple interest.
b. To convert temperature reading from celsius to fahrenheit.
c. To find area and perimeter of rectangle.
12. L3 6M
d. To find area and circumference of a circle.
e. To find area of triangle by reading 3 sides of it.
f. To find largest of 2 numbers using if else statement.
g. To find largest of three numbers using ternary operator.
Write c programs for following.
a. To calculate simple interest.
b. To convert temperature reading from celsius to fahrenheit.
c. To find area and perimeter of rectangle.
13. d. To find area and circumference of a circle. L3 6M
e. To find area of triangle by reading 3 sides of it.
f. To find largest of 2 numbers using conditional operator.
g. To find largest of 2 numbers using if else statement.
h. To find largest of three numbers using ternary operator.
Module-2 Assignment Questions
Sl No Questions RBTL Marks
1. Explain Input and Output statements in C. L2 10M
List the conditional branching statements in ‘C’. Explain any two with
2. L1 6M
example.
3. List and explain unconditional branching statements with example. L1 8M
4. Explain different types of loops in C. Justify with its syntax and example. L2 8M
What are iterative statements? Explain three types of iterative statements
5. L2 10M
with their syntax.
Explain printf() and scanf() functions with their syntax.
6. L2 8M
Give the illustrative examples.
7. Explain the different forms of if statement with flowcharts. L1 10M
Explain if, if-else, nested if and cascaded if-else statements with syntax and
8. L2 8M
example.
9. Explain the switch statement with an example. L2,L3 10M
10. Explain break and continue statements with an example for each. L2,L3 4M
Explain break and continue statements with respect to while, do-while and
11. L2 6M
for loops.
12. Explain for loop statement with syntax and example program. L2 6M
13. WAP to reverse a number using while loop. L3 6M
14. WAP to find a factorial of a number using for loop. L2 6M
Write a C program to find the largest of three numbers using nested if
15. L2 6M
statement.
16. Write a C program to find largest of three numbers using ternary operator. L3 10 M
Write a C program to compute the roots of a quadratic equation by
17. L3 10M
accepting the coefficients, print appropriate messages.
Write a program to print the following pattern.
*
**
18. L3 10M
***
****
*****
Write a program to print the following pattern.
1
19. 1 2 L3 10M
1 2 3
1 2 3 4
Write a program to print the following pattern.
1 2 3 4 5
2 3 4 5 6
20. 3 4 5 6 7 L3 10M
4 5 6 7 8
5 6 7 8 9
Write a c program to simulate simple calculator to perform arithmetic
operations like addition subtraction, multiplication and division operations
21. L3 6M
using switch statement. Error message should be displayed if any attempt
is made to division by zero.