0% found this document useful (0 votes)
7 views3 pages

Assignment Question

The document outlines a series of assignment questions that require the development of algorithms and programs in C. Topics include calculating areas, interest, salaries, series sums, error types, data types, and flowchart creation. It also includes specific programming tasks such as matrix operations and loops.

Uploaded by

adarshsah5551
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views3 pages

Assignment Question

The document outlines a series of assignment questions that require the development of algorithms and programs in C. Topics include calculating areas, interest, salaries, series sums, error types, data types, and flowchart creation. It also includes specific programming tasks such as matrix operations and loops.

Uploaded by

adarshsah5551
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Assignment Questions:

1. Write an algorithm to find the area of a right-angled triangle, prior


check triangle is right-angled or not.
2. Write an algorithm to calculate simple interest and compound
interest for amount (P) for tenure(T) with rate of interest(R).
3. Write an algorithm to find out the gross salary of a person with
basic salary =₹80,000, housing allowance =30% of basic salary,
tax deduction at source (TDS) = 10% and Special allowance = 5%
of basic.
4. Write an algorithm to compute sum of first n natural numbers.
5. Write an algorithm to find the sum of series

1+ (1/2) ^2 +(1/3)^2 +…….(1/n)^2

6. Write an algorithm to generate series 0,1,1,2,3,5,8…….


7. Write an algorithm to find a) Factors of a number

b) Factorial of a number

8. Draw a flowchart to check a number is even/odd.


9. Draw a flowchart to compute factorial of a number.
10. Draw a flowchart to find roots of a quadratic equation
ax^2+bx+c=0.
11. Draw a flowchart to find sum of series 1+2^2+3^2+……n.
12. Draw a flow chart and write algorithm to generate pattern

14. Write a C program of algorithm in Qno. 3


15. Write a program to compute area of the circle.
16. Write a program to convert centigrade to Fahrenheit.
17. What is error? What are the different types of error in C. Give
examples of Syntax error and Logical error.
18. What are different data types in C. Differentiate between a)
signed and unsigned int. b) Signed char and unsigned char
19. What is purpose of return statement?
20. What do you mean by return (0) and return (1) in the main
function.
21. Write a program in C to find area and circumference of a circle.
Take R radius as user input.
22. Explain the process of converting Source Code to Object Code in
C?
23. Which of the following converts Object code into Executable
Code.
a) Compiler b) Interpreter c) Linker d) Loader
24. What is the role of
a) compiler b) Linker c) Interpreter d) Loader
25. Which of the following correctly declares a variable that can hold
at least 10-digit integer value in C.
a) Integer b) Short Integer c) Long Integer d) Long Long Integer
26. Which of the following error is generated by code segment:
int x;
x= x+2
a) Logical error b) Runtime error c) Syntax error d) Semantic
error
27. Indicate the type of error:
int x, y, s
scanf(“%d, %d”, x,y);
s= x+y;
a) Logical error b) Runtime error c) Semantic error
d) Syntax error
28. What do you mean by:
a) Logical error b) Runtime error c) Semantic error
d) Syntax error
Give examples of each.
29. Write a program to swap two integer value without using a
temporary value.
30. Find sum of first 20 odd numbers using for loop.
31. Write a program to print the number 5, five times, number 4, four
times, number 3, three times, number 2, two times, number 1,
once (nested for loop)
32. WAP to find sin (x)(loop)
33. Use d while to find sum 1-1/2+1/3-1/4+1/5....up to n terms.
34. WAP to print sum of all even integers between 1 to 100(while
loop)
35. WAP to accept your name and print it for the desired number of
times (do while loop).
36. WAP to accept a number and reverse it.
37. WAP to accept two integer array and find sum of compared
elements of array.
38. WAP to find sum of even and odd stored in array of N integers.
39. WAP to find product of two matrix
40. WAP to find inverse of a matrix.
41. WAP to accept a matrix and determine whether it is a square
matrix.

You might also like