Model Question
Diploma in Electronics & Tele Communication Engineering
(Computer Programming Language)
Course Code: ETCE/ CPGM/ S3
3rd Semester
Submit the assignment on the date of 1st internal
examination on 10.07.2024
1. Write short notes on ( 4 marks each ) :
a) Keywords in C, k) Logical & Relational operator,
b) Identifiers in C, l) Shorthand assignment operator,
c) Constants in C, m) Bitwise operator,
d) Primary Data types in C, n) Conditional operator,
e) Data Type Casting o) Increment & Decrement operator
f) Operator precedence & p) Formatted Input & output,
associativity, q) do-while loop,
g) Different if statements, r) for loop,
h) Switch statement, s) while loop,
i) Flowchart for compiling & running t) break & continue statement,
a program, u) getchar() & putchar(),
j) Symbolic constant, v) Library Function.
2. What are the difference among the while, do-while & for loop. Explain with
example. 7
3. Write a program to check whether a given year is leap year or not leap year with
following condition – A year is leap year when – (i) it is divisible by 400. (ii) it is
divisible by 4 but not divisible by 100. 7
4. Write a C program to sum the sine series 7
5. Write a C program which accepts integer number and prints the sum of digits. 7
6. Write a C program to convert a decimal number (whole number) to Binary
System. 7
7. Write a C program to find roots of a Quadratic Equation 7
8. Write a program to display the following pattern called Floyed’s Triangle. 7
1
2 3
4 5 6
7 8 9 10
9. Write a C program to reverse the integer 7
10.Write a C Program to find whether a given number, n is prime or not. 7
11.Write a C program to print PASCAL triangle 7
12.Write a C program to find the sum of all integers between n1 & n2 that are
divisible by 3 & 7. The value of n1 & n2 should be taken from the user. 5
13.Write a C program to calculate GCD of two integers 5
14.Write a C program to calculate LCM of two integers 7
15.What do you mean by compile time error, run time error and logical error? 4
16.Write a program to find the factorial of a given number. 5
1
17.Write a C program to swap two numbers without using any temporary variables.
4
18.Write short notes on difference between looping & branching, difference between
unary & binary operator. 4 + 4
19.Write a C program to arrange a set of n numbers in ascending order. 7
20.Write a recursive program to compute the factorial of a number. 5
21.Write a recursive function to evaluate the Fibonacci series. 5
22.Write a C program to check whether a given string is palindrome or not. 5