Sei sulla pagina 1di 5

1) Write a program to copy the content of one file to another

file.

2) Write a program which takes 10 integer numbers from user. Save


all the positive numbers to one file, all the negative numbers
to another file.

3) Write a program to generate the Fibonacci series up to user


specified limit using recursive function.

4) Write a program to generate the following pattern.

INDIAIDNI

INDI IDNI

IND DNI

IN NI

I I

5) Write a program to find whether a given string is palindrome


or not.

6) Write a program to implement a stack using array. Define the


push and pop operation.

7) Define the structure called student having properties like


stud_id, stud_name, stud_branch, and email_add. Write a
program which takes the details of 5 student and write the
details to one file having name “Stud_Records.txt”.

8) Write a program to implement linked list. A node of linked


list contains student id and student name. Write methods to
add, delete a student also write a method to display all the
students in a linked list.

9) Write a program which writes the prime numbers bet. 1 to 100


in one file and prime numbers bet. 101 to 200 in another file.
1) Write a program to generate the following pattern.

1234

123

12

12

123

1234

2) Write a program to generate the following pattern.

101

10101
1010101

10101

101

3) Write a program which takes two n*n matrices where n will be


specified by the user. Write a method which does summation of
both matrices and store the result in third matrix also
display the resultant matrix.

4) Write a program which removes all the white spaces and new
line character from a file.

5) Write a program to find a given word in a file if it exist and


also show the location of that word in a file.

6) Define a structure called student having properties like


student id, student name and branch of student. Write a
program which allows user to add new student, delete a student
and also display all the students. Use array to store students
record.

7) Write a program to sort the nodes of linked list in an


acceding order.

8) Write a program which accepts a string from user and encodes


it. Apply the following procedure to encode the string.

 Convert each character in a string to its ASCI value.

 Add an integer value to it.

 Display the encoded string.

Also decode the string into its original form using the
reverse procedure and display the same.

9) Write a program which replaces a specified word in a file with


another word if it exists. If it does not exists display an
appropriate message.

1) Write a program to merge the content of two different file in


a single file.
2) Write a program which takes two integer arrays from user.
Merge both the array in a single sorted array in acceding
order.

3) Write a program which takes two integer n1 and n2 from user


where n1<n2. Create functions that calculate the sum of all
the integers ranging from n1 and n2, sum of all the odd
numbers ranging from n1 and n2, sum of all the even numbers
ranging from n1 and n2. Display an error message if n1>n2.

4) Create a structure ComplexNumber having real and imaginary


part as properties. Write functions to add and subtract two
complex numbers. Call them from the main program.

5) Write a program to find a factorial of given number using


recursion.

6) Write a program to exchange the values of 2 integer values


using pointer and functions.

7) Write a program to remove all the comments ( single line and


multiple line ) from a C program file.

8) Write a program that accept integer number and convert it into


binary number and octal.

9) Write a program that accept integer number and convert it into


Hexadecimal number.
1. Write a program to add two binary numbers.

2. Write a program to reverse given string using pointer.

3. Create a structure called Employee having member fields


like name, gender and salary. Write a program that
accepts the details of employees.

Display the employee details who has highest salary.

Display all employees in sorted order according to their


name.

Potrebbero piacerti anche