0% found this document useful (0 votes)
9 views37 pages

Faraz Arb2 C File

Uploaded by

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

Faraz Arb2 C File

Uploaded by

farazansari99914
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 37

1

Practical file on:-


Programming for Problem
Solving(ICT-151)

Submitted by: Submitted To:


NAME:- Mohd Faraz Dr. Amit Choudhary
BRANCH:- AR B2 Assistant Professor
ENROLMENT NO. 703 USAR, GGSIPU

University School of Automation and Robotics,East Campus, GGSIP University

Surajmal Vihar, New Delhi - 110092

INDEX
2

S.no Question Page


no
3

1
Write a C program to print hello world.

2
Write a C program to print the ASCII value of a given character.

3
Write a C program to print the sum and average of three numbers.

4
Write a C program to find the sum of individual digits of a given positive integer.

5
Write a C program to generate prime numbers from 1 to n.

6
Write a C program to check whether a number is Armstrong or not.

7
Write a C program to perform arithmetic operations using switch statements.

8
Write a C program to find GCD of two numbers using non recursive functions.

9
Write a C program that uses functions to perform multiplication of two matrices.

10
Write a C program that uses a function to insert a sub string into a given main string from a given
position.

11
Write a C program using a user defined function to determine whether a function is palindrome or
not.

12
Write a C program to count the number of lines, words and characters in a given file.

13
Write a C program to calculate total and percentage marks of a student using structure.

14
Write a C program to print the first n terms of a Fibonacci Sequence.

15
Write a C program to demonstrate linear and binary search.

16 Write a C program to perform insertion sort

17 Write a C program to find the roots of the quadratic equation


4

Q1-> Write a C program to print hello world.


Input Code:-

Output:-

Q2->Write a C program to print the ASCII value of a given character.

Input Code
5

Output:-

Q3:- Write a C program to print the sum and average of three numbers
Input Code

Output

Q4:- Write a C program to find the sum of individual digits of a given positive integer.
Input code
6

Output :-

Q5:- Write a C program to generate prime numbers from 1 to n.


Input code:-
7

Output

Q6:-Write a C program to check whether a number is Armstrong or not.


Armstrong number:-are integers that are equal to the sum of their own digits each raised to the
power of the number of digits. For example, 153 is an Armstrong number because
1^3+5^3+3^3 = 153
Input code:-
8

Output:-

Q7 Write a C program to perform arithmetic operations using switch statements


9
10

Output:
11

Q8->Write a C program to find GCD of two numbers using non recursive


functions.

Output:
12

Q9->Write a C program that uses functions to perform multiplication of two


matrices
13
14

Output:
15

Output2:
16

Q10=>Write a C program that uses a function to insert a sub string into a given
main string from a given position.
17
18

Output:
19

Q11-> Write a C program using a user defined function to determine whether a


function is palindrome or not.
20
21

Output:

Q12-> Write a C program to count the number of lines, words and characters in a
given file
22
23
24

Output:

Q13-> Write a C program to calculate total and percentage marks of a student


using structure
25
26

Output:
27

Q14-> Write a C program to print the first n terms of a Fibonacci Sequence.


28
29

Output:

Q15-> Write a C program to demonstrate linear and binary search.


30
31
32
33

Output:

Q16-> Write a C program to perform insertion sort


34
35

Output:

Q17->Write a C program to find the roots of the quadratic equation


36
37

Output:

You might also like