You are on page 1of 2

FS OF BE II ELECTRONICS

DSCP LAB

ASSIGNMENT 1

1. write a ‘C’ program to print Fibonacci series


2. write a ‘C’ program to check entered no is prime or not.
3. write a ‘C’ program to print the HCF and LCM of given two numbers
4. write a ‘C’ program to check entered number is automorphic or not
5. Write a program to Count Number of Digits in an Integer and also find the sum of the digits.
6. Write a program to reverse the digits of given no.
7. Write a program to print the Pascal’s triangle and Flyod’s triangle.
8. Programs to display pyramid and inverted pyramid using * and digits.

ASSIGNMENT 2

1. write a ‘C’ functions rev() that returns the reverse of the entered number
2. write a ‘C’ functions that inputs two numbers and print all prime numbers between those two
numbers
3. write a ‘C’ function to check the entered number is palindrome or not
4. write a ‘C’ function that converts decimal to binary numbers
5. write a ‘C’ program that find permutation and combinations using user defined functions
6. Write a program to add, subtract, multiply and divide two integers using user defined type
function with return type.
7. Define a function named fact() to calculate factorial of a number n .
8. To perform swapping of two numbers using call by value and call by reference.

ASSIGNMENT 3

1. Write a program to find transpose of matrix


2. Write a program to find multiplication of given two matrices
3. Write a ‘C’ program to accept any two strings from the user. Display whether both the strings
are equal or not. (Do not use standard functions
4. Write a ‘C’ program total Number of Words ,spaces and characters in the Sentence
5. Write a ‘C’ program to reverse the given String

ASSIGNMENT 4 [NON LINEAR EQUATION]

1. Write a program to find the roots of nonlinear equation using bisection method.
2. Write a program to find the roots of nonlinear equation using false position method
3. Write a program to find the roots of nonlinear equation using Newton Raphson method
4. Write a program to find the roots of nonlinear equation using secant method

ASSIGNMENT 5 [LINEAR EQUATION]

1. Write a program to solve a set of linear equations using Gauss Elimination Method.
2. Write a program to solve a set of linear equations using L-U factorization method
3. Write a program to sove a set of linear equations usinf Numerical Integration ( Simpson’s 3/8
Rule) method
ASSIGNMENT 5 [ARRAYS]

1. Write a program to insert an element at the given position from an array.


2. Write a program to delete an element from the given position from an array.
3. Write program to merge two sorted arrays.
4. Write a program to sort a given array using bubble sort method
5. Write a program to sort a given array using insertion sort
6. Write a program to sort a given array using selection sort
7. To search an element in a array using binary search
8. To search an element in a array using linear search

ASSIGNMENT 6 [ STACK AND QUEUE]

1. Write a program in C to demonstrate PUSH and POP operation in a Stack using arrays
2. Write a program in C to demonstrate INSERTION and DELETION operation in a Queue using
arrays
ASSIGNMENT 7[STRUCTURE]

1. Create a structure named company which has name, address, phone and no OfEmployee as
member variables. Read name of company, its address, phone and noOfEmployee.Finally display
these members’ value.
2. Define a structure “complex” to read two complex numbers and perform addition, subtraction of
these two complex numbers and display the result.

ASSIGNMENT 8[FILE HANDLING]


1. Write characters into a file “filec.txt”. The set of characters are read form the keyboarduntil an
enterkey is pressed (use putc() and getc() function).
2. Read characters form file “filec.txt” created in question 1. Also count the number ofcharacters in
the file (usefputs() and fgets() function).
3. Write set of strings each of length 40 into a file “stringc.txt” and display it (use fputs() and fgets()
function).
4. Write name, age and height of a person into a data file “person.txt” and read it (usefprintf() and
fscanf() function)

You might also like