0% found this document useful (0 votes)
2 views65 pages

C Programming LAB Syllabus Programs 1 42 (1)

The document outlines the syllabus for the C Programming Lab course for B. Tech students at KGRCET Hyderabad, detailing course objectives, outcomes, and a variety of programming exercises. It includes practical sessions on basic C programming concepts, data structures, file handling, and more complex problems involving arrays, pointers, and structures. Additionally, it provides suggested reference books for further study.

Uploaded by

Aarthik Buguda
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
2 views65 pages

C Programming LAB Syllabus Programs 1 42 (1)

The document outlines the syllabus for the C Programming Lab course for B. Tech students at KGRCET Hyderabad, detailing course objectives, outcomes, and a variety of programming exercises. It includes practical sessions on basic C programming concepts, data structures, file handling, and more complex problems involving arrays, pointers, and structures. Additionally, it provides suggested reference books for further study.

Uploaded by

Aarthik Buguda
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 65

R21 B.

Tech Syllabus KGRCET Hyderabad

C PROGRAMMING LAB
(Common to all branches)

Course Code: KG21CS107 L T P C


0 0 2 1

B. Tech. I Year I-Semester

Prerequisites: [Note: The programs may be executed using any available Open Source / Freely available
IDE Some of the Tools available are:

Code Lite: https://codelite.org/

Code: Blocks: http://www.codeblocks.org/

DevCpp: http://www.bloodshed.net/devcpp.html

Eclipse: http://www.eclipse.org

This list is not exhaustive and is NOT in any order of preference]

Course Objectives: The course will help students to learn

1. To work with an IDE to create, edit, compile, run and debug programs

2. To develop programs to solve basic problems by understanding basic concepts in C like operators,
control statements etc.

3. To develop modular, reusable and readable C Programs using the concepts like functions, arrays etc.

4. To write programs using the Dynamic Memory Allocation concept.

5. To create, read from and write to text and binary files

Course Outcomes: After completion of this course, the students will be able to

CO1: Formulate the algorithms for simple problems and identify correct logical errors encountered during
execution.

CO2: Modularize the code with functions so that they can be reused.

CO3: Represent and manipulate data with arrays and strings.

CO4: Use structures and pointers of different types.

CO5: Create, read and write to and from simple text and binary files.
R21 B. Tech Syllabus KGRCET Hyderabad

Practice Sessions:

1. Write a simple program that prints the results of all the operators available in C (including pre/ post
increment, bitwise and / or / not, etc.). Read required operand values from standard input.

2. Write a simple program that converts one given data type to another using auto conversion and casting.
Take the values from standard input.

Simple Numeric Problems:

1. Write a program for find the max and min from the three numbers.

2. Write the program for the simple, compound interest.

3. Write program that declares Class awarded for a given percentage of marks, where mark <40%= Failed,
40% to <60% = Second class, 60% to <70%=First class, >= 70% = Distinction. Read percentage from
standard input.

4. Write a program that prints a multiplication table for a given number and the number of rows in the
table. For example, for a number 5 and rows = 3, the output should be:

5x1=5

5 x 2 = 10

5 x 3 = 15

Expression Evaluation:

1. A building has 10 floors with a floor height of 3 meters each. A ball is dropped from the top of the
building. Find the time taken by the ball to reach each floor. (Use the formula s = ut+(1/2) at^2 where
u and a are the initial velocity in m/sec (= 0) and acceleration in m/sec^2 (= 9.8 m/s^2)).

2. Write a C program, which takes two integer operands and one operator from the user, performs the
operation and then prints the result. (Consider the operators +, -, *, /, % and use Switch Statement)

3. Write a program that finds if a given number is a prime number

4. Write a C program to find the sum of individual digits of a positive integer and test given number is
palindrome.

5. A Fibonacci sequence is defined as follows:

The first and second terms in the sequence are 0 and 1. Subsequent terms are found by adding the
preceding two terms in the sequence. Write a C program to generate the first n terms of the sequence.

6. Write a C program to generate all the prime numbers between 1 and n, where n is a value supplied by
the user.

7. Write a C program to find the roots of a Quadratic equation.

8. Write a C program to calculate the following, where x is a fractional value. 1-x/2 +x^2/4-x^3/6

9. Write a C program to read in two numbers, x and n, and then compute the sum of this geometric
progression: 1+x+x^2+x^3+…………. +x^n. For example: if n is 3 and x is 5, then the program
R21 B. Tech Syllabus KGRCET Hyderabad

computes 1+5+25+125.

Arrays and Pointers and Functions:

1. Write a C program that uses functions to perform the following:

i. Addition of Two Matrices

ii. Multiplication of Two Matrices

iii. Transpose of a matrix with memory dynamically allocated for the new matrix as row and
column counts may not be same.

2. Write a C program to find the minimum, maximum and average in an array of integers.

3. Write a function to compute mean, variance, Standard Deviation, sorting of n elements in single
dimension array.

4. Write a C programs that use both recursive and non-recursive functions

i. To find the factorial of a given integer.

ii. To find the GCD (greatest common divisor) of two given integers.

iii. To find x^n

5. Write a program for reading elements using pointer into array and display the values using array.

6. Write a program for display values reverse order from array using pointer.

7. Write a program through pointer variable to sum of n elements from array.

Strings:

1. Write a C program to convert a Roman numeral ranging from I to L to its decimal equivalent.

2. Write a C program that converts a number ranging from 1 to 50 to Roman equivalent

3. Write a C program that uses functions to perform the following operations:

i. To insert a sub-string in to a given main string from a given position.

ii. To delete n Characters from a given position in a given string.

4. Write a C program to determine if the given string is a palindrome or not (Spelled same in both
directions with or without a meaning like madam, civic, noon, abcba, etc.)

5. Write a C program that displays the position of a character ch in the string S or – 1 if S doesn ‘t contains
ch.

6. Write a C program to count the lines, words and characters in a given text.

Files:

1. Write a C program to display the contents of a file to standard output device.


R21 B. Tech Syllabus KGRCET Hyderabad

2. Write a C program which copies one file to another, replacing all lowercase characters with their
uppercase equivalents.

3. Write a C program to count the number of times a character occurs in a text file. The file name and the
character are supplied as command line arguments.

4. Write a C program that does the following:

It should first create a binary file and store 10 integers, where the file name and 10 values are given in
the command line. (hint: convert the strings using atoi function). Now the program asks for an index
and a value from the user and the value at that index should be changed to the new value in the file.
(hint: use fseek function). The program should then read all 10 values and print them back.

5. Write a C program to merge two files into a third file (i.e., the contents of the first file followed by
those of the second are put in the third file).

Structures:

Write a C program that uses functions to perform the following operations:

i. Reading a complex number

ii. Writing a complex number

iii. Addition of two complex numbers

iv. Multiplication of two complex numbers

(Note: represent complex number using a structure.)

Miscellaneous:

1. Write a menu driven C program that allows a user to enter n numbers and then choose between finding
the smallest, largest, sum, or average. The menu and all the choices are to be functions. Use a switch
statement to determine what action to take. Display an error message if an invalid choice is entered.

2. Write a C program to construct a pyramid of numbers as follows:

1 * 1 1 *
1 2 * * 2 3 2 2 * *
1 2 3 * * * 4 5 6 3 3 3 * * *
4 4 4 4 * *
*
Suggested Reference Books for solving the problems:
1. Byron Gottfried, Schaum’s, “Outline of Programming with C”, McGraw-Hill
2. B.A. Forouzan and R.F. Gilberg, “C Programming and Data Structures”, Cengage Learning, (3rd
Edition, 2018)
3. Brian W. Kernighan and Dennis M. Ritchie, “The C Programming Language”, Prentice Hall of India.
4. R.G. Dromey, “How to solve it by Computer”, Pearson, (16th Impression)
5. Programming in C, Stephen G. Kochan, Pearson Education, (4th Edition)
6. Herbert Schildt, “C: The Complete Reference”, Mc Graw Hill, 4th Edition
1. Write a simple program that prints the results of all the operators available in C (including
pre/ post increment, bitwise and/or/not, etc.). Read required operand values from standard
input.

Aim: Program that prints the results of all the operators available in C. Program:

#include<stdio.h>void
main( )
{
int a,b;
printf(“enter the values of a and b”);
scanf(“%d%d”,&a,&b);
printf(“the arithmetic operators result is %d %d %d %d”, a+b,a-b,a*b,a/b);
printf(“the relational operators result is %d %d %d %d”, a>b,a<b,a>=b,a<=b);
printf(“the logical operators result is %d %d %d”, a&&b,a||b,!(a==b)); printf(“the
increment operator result is %d %d %d %d”,a++,++a,b++,++b); printf(“the
decrement operator result is %d %d %d %d”,a--,--a,b--,--b); printf(“the bitwise
AND operator result is %d”,a&b);
printf(“the bitwise OR operator result is %d”,a|b); printf(“the
bitwise NOT operator result is %d”,a^b);
}

Output:
2. Write a simple program that converts one given data type to another using auto
conversion. Take the values form standard input.

Aim: program that converts one given data type to another using auto conversion.

Program:

#include<stdio.h>
#include<conio.h> void
main()
{
float sum, count;

int mean; clrscr();

printf("enter the value of sum and count");


scanf("%f%f",&sum, &count);
mean=sum/count;
printf(" the value of mean is : %d\n", mean);
}
Output:
3. Write a program for find the max and min from the three numbers.

Aim: program for find the max and min from the three numbers. Program:

#include<stdio.h>
#include<conio.h> void
main( )
{
int a,b,c;
clrscr();
printf("Enter 3 numbers");
scanf(“%d%d%d”,&a,&b,&c); if(a>b &&
a>c)
printf("Maximum number is a = %d",a);else
if(b>a && b>c)
printf("Maximum number is b = %d",b);
else
printf("Maximum number is c = %d",c);
printf("\n");
if(a<b && a<c)
printf("Minimum number is a = %d",a);else
if(b<a && b<c)
printf("Minimum number is b = %d",b);
else
printf("Minimum number is c = %d",c);
getch();
}
Output:
4. Write the program for the simple, compound interest.

Aim: program for the simple, compound interest.

Program:

#include<stdio.h>
#include<conio.h>
#include<math.h> void
main()
{
int p,t;
float r,si, amount, ci;
clrscr( );
printf("Please enter principle,time and rate of interest");
scanf("%d%d%f",&p,&t,&r);
si=p*t*r/100;
printf("\nSimple interest = %.3f",si);
amount=p*pow((1 +r/100),t); ci=amount-
p;
printf("\nCompound interest = %.3f",ci);
getch( );
}

Output:
5. Write program that declares Class awarded for a given percentage of marks, where mark
<40%= Failed, 40% to <60% = Second class, 60% to <70%=First class, >= 70%
= Distinction. Read percentage from standard input.

Aim: program that declares class awarded for a given percentage of marks. Program:

#include<stdio.h>
#include<conio.h>

void main()
{
int phy, chem, bio, math, comp; float
per;
clrscr();
printf("Enter five subjects marks: ");
scanf("%d%d%d%d%d", &phy, &chem, &bio, &math, &comp);per =
(phy + chem + bio + math + comp) / 5.0; printf("Percentage =
%.2f\n", per);
if(per >= 70)
{
printf("Distinction");
}
else if(per <70 && per>=60)
{
printf("First Class");
}
else if(per <60 && per>=40)
{
printf("Second Class");
}
else
{
printf("Failed");
}
}
Output:
6. Write a C program to find the roots of a Quadratic equation.

Aim: Program to find the roots of a Quadratic equation.

Program:

#include<stdio.h>
#include<conio.h>
#include<math.h>

void main()
{
float a,b,c,root1,root2;
clrscr();
printf("\n Enter values of a,b,c for finding roots of a quadratic eq:\n");
scanf("%f%f%f",&a,&b,&c);

/*checking condition*/
if(b*b>4*a*c)
{
root1=(-b+sqrt(b*b-4*a*c))/(2*a);
root2=(-b-sqrt(b*b-4*a*c))/(2*a);
printf("\nRoots are real\n");
printf("\n root1=%f\n root2=%f",root1,root2);
}
else if(b*b==4*a*c)
{
printf("The roots are real and equal\n"); printf("\n
root1=%f\n root2=%f",root1,root2);
}
else
printf("\n Imaginary Roots.");
}

Output:
7. Write a program that prints a multiplication table for a given number and the number of
rows in the table. For example, for a number 5 and rows = 3, the output should be: 5 x 1 =
5
5 x 2 = 10
5 x 3 = 15

Aim: program that prints a multiplication table for a given number and the number of rows
in the table.

Program:

#include <stdio.h>
#include<conio.h> void
main()
{
int n, i, range;
clrscr();
printf("Enter an integer: ");
scanf("%d",&n); printf("Enter
the range: "); scanf("%d",
&range); for(i=1; i<=range; i++)
{
printf("%d * %d = %d \n",n,i, n*i);
}
}

Output:
8. Write a program that shows the binary equivalent of a given positive number between 0 to
255.

Aim: a program that shows the binary equivalent of a given positive number between 0 to
255.

Program:

#include<stdio.h>
#include<conio.h>
#include<math.h> void
main()
{
int num, rem=0, inum, p=0; long
int bin=0;
clrscr();
printf("Enter the number between 0 and 255");
scanf("%d",&num);
clrscr(); inum=num;
while(inum>0)
{
rem=inum%2;
bin+=rem*pow(10,p);
inum/=2;
p++;
}
printf("%d binary equivalent number is %ld",num,bin);
}
Output:
9. Write a C program to construct a pyramid of numbers as follows:

Aim: Program to construct a pyramid of numbers. 1


12
123

Program:

#include <stdio.h>void
main()
{
int i, j, rows;
printf("Enter number of rows: ");
scanf("%d",&rows);
for(i=1; i<=rows; ++i)
{
for(j=1; j<=i; ++j)
{
printf("%d ",j);
}
printf("\n");
}
}

Output:
Enter number of rows3
1
12
123
Aim: Program to construct a pyramid of numbers.
*
**
*** Program:

#include <stdio.h>void
main()
{
int i, j, rows;
printf("Enter number of rows: ");
scanf("%d",&rows);
for(i=1; i<=rows; ++i)
{
for(j=1; j<=i; ++j)
{
printf("* ");
}
printf("\n");
}
}

Output:
Enter number of rows3
*
**
***
Aim: Program to construct a pyramid of numbers. 1
23
456

Program:

#include <stdio.h>void
main()
{
int i, j, rows,num=1; printf("Enter
number of rows: ");
scanf("%d",&rows);
for(i=1; i<=rows; ++i)
{
for(j=1; j<=i; ++j,num++)
{
printf("%d ",num);
}
printf("\n");
}
}

Output:
Enter number of rows3
1
23
456
Aim: Program to construct a pyramid of numbers. 1
22
333
4444

Program:

#include <stdio.h>void
main()
{
int i, j, rows;
printf("Enter number of rows: ");
scanf("%d",&rows);
for(i=1; i<=rows; ++i)
{
for(j=1; j<=i; ++j)
{
printf("%d ",i);
}
printf("\n");
}
}

Output:
Enter number of rows4
1
22
333
4444
Aim: Program to construct a pyramid of numbers.

*
**
***
****
***
**
*

Program:
#include <stdio.h> int
main()
{
int i, j, rows;
printf("Enter number of rows: "); scanf("%d",&rows);
for(i=1; i<=rows; ++i)
{
for(j=1; j<=i; ++j)
{
printf("* ");
}
printf("\n");
}
for(i=rows-1; i>=1; --i)
{
for(j=1; j<=i; ++j)
{
printf("* ");
}
printf("\n");
}

OUTPUT:
Enter number of rows: 4
*
**
***
****
***
**
*
10. A building has 10 floors with a floor height of 3 meters each. A ball is dropped from the
top of the building. Find the time taken by the ball to reach each floor. (Use the formula s
= ut+(1/2) at^2 where u and a are the initial velocity in m/sec (= 0) and acceleration in
m/sec^2 (= 9.8 m/s^2)).

Aim: program to print time taken by the ball to reach each floor.

Program:

#include<stdio.h>
#include<conio.h>
#include<math.h> void
main()
{
double a=9.8, t=0.0, tt=0.0; int
i,s=3;
clrscr(); for(i=10;i>=1;i--
,s+=3)
{
t = sqrt((2*s)/a);
printf("The time taken from %d to %d is %lf\n",i,i-1,t);
}
}

Output:
11. Write a C program, which takes two integer operands and one operator from the user,
performs the operation and then prints the result. (Consider the operators +, -, *, /, % and
use Switch Statement)

Aim: program which takes two integer operands and one operator from the user, performs the
operation and then prints the result.

Program:

#include<stdio.h>
#include<conio.h> void
main()
{
int a,b; char
ch;clrscr();
printf(" + for addition\n"); printf(" -
for subtraction\n"); printf(" * for
multiplication\n");printf(" / for
division\n"); printf(" '\%' for
modulus\n"); printf("Enter your
choice"); scanf("%c",&ch);
printf("Enter two integers");
scanf("%d%d",&a,&b);
switch(ch)
{
case '+':
printf("The addition of %d and %d is %d",a,b,a+b); break;

case '-':
printf("The subtraction of %d and %d is %d",a,b,a-b);
break;

case '*':
printf("The multiplication of %d and %d is %d",a,b,a*b);break;

case '/':
printf("The division of %d and %d is %d",a,b,a/b);break;
case '%':
printf("The modulus of %d and %d is %d",a,b,a%b);
break;

default:
printf("Entered wrong operator");
}
}

Output:
12. Write a program that finds if a given number is a prime number Aim:

program to find the given number is a prime number or not. Program:

#include<stdio.h>void
main()
{
int num,i=2,count=0,rem=0;
clrscr();
printf("Enter a number");
scanf("%d",&num);
while(i<=num/2)
{
rem = num%i;
if(rem==0) count++;
i++;
}

if(count>=1)
printf("The %d is not prime",num);
else
printf("the %d is prime",num);
}

Output:

13. Write a C program to find the sum of individual digits of a positive integer and test given
number is palindrome.

Aim: Program to display the sum of individual digits of a positive integer and
palindrome number.

Program:

#include<stdio.h>
#include<conio.h>
#include<math.h>

void main()
{
int num,rem,tnum,pal=0,i=2,sum=0;
clrscr();
printf("enter number");
scanf("%d",&num);
tnum=num;
while(tnum>0)
{
rem = tnum%10;
sum+=rem;
pal+=rem*pow(10,i); i--;
tnum/=10;
}
printf("The sum of individual digits of %d is %d \n",num,sum);

if(pal == num)
printf("The %d is palindrome number",pal);
else
printf("The %d is not a palindrome number",pal);
}

Output:
14. Write a C program to generate the first n terms of the sequence.

Aim: Program to display the first n terms of the Fibonacci sequence. Program:

#include <stdio.h>

void main()
{

int num1=0, num2=1,n,counter,fib;


clrscr();
printf("Enter Length of Series (n value) : ");
scanf("%d",&n);
printf("\n\t<----Fibonacci Series ---- >");
printf("\n\t%d %d",num1,num2);

//Loop will run for 2 Time less in series as first 2 digits printed in advance
for(counter = 1; counter <= n-2; counter++)
{
fib=num1 + num2;
printf(" %d",fib);
num1=num2;
num2=fib;
}
}

Output:
15. Write a C program to generate all the prime numbers between 1 and n, where n is avalue
supplied by the user.

Aim: program to generate all the prime numbers between 1and n. Program:

#include <stdio.h>

void main()
{
int no,counter,counter1,check;
clrscr();
printf("< PRIME NO. SERIES >");
printf("\n\n\n\t\t\tINPUT THE VALUE OF N: ");
scanf("%d",&no);
printf("\n\nTHE PRIME NO. SERIES B/W 1 TO %d : \n\n",no);

//This loop will check a number to be prime number or not.

for(counter = 1; counter <= no; counter++)


{
check = 0;
for(counter1 = counter-1; counter1 > 1 ; counter1--)
if(counter%counter1 == 0)
{
check++; // Increment Check, If Number is not a prime.
break;
}

if(check == 0)
printf("%d\t",counter);
}

Output:
16. Write a C program to calculate the following, where x is a fractional value. 1-x/2
+x^2/4-x^3/6

Aim: program to calculate the following, where x is a fractional value. 1-x/2 +x^2/4-
x^3/6

Program:
#include<stdio.h>
#include<conio.h>
#include<math.h> void
main()
{
float x,sum=1.0; int n;
clrscr();
printf("Enter x value");
scanf("%f",&x);
for(n=1;n<=3;n++)
{
sum+=((pow(-1,n))*((pow(x,n)/(2*n))));
}
printf("The sum of expression is %f",sum);
}
Output:
17. Write a C program to read in two numbers, x and n, and then compute the sum of this
geometric progression: 1+x+x^2+x^3+ ................ +x^n. For example: if n is 3 and x
is 5, then the program computes 1+5+25+125.

Aim: program to read in two numbers, x and n, and then compute the sum of this
geometric progression: 1+x+x^2+x^3+ ................ +x^n.
Program:
#include<stdio.h>
#include<conio.h>
#include<math.h> void
main()
{
int i,x,n,sum=0;
clrscr();
printf("Enter x,n values");
scanf("%d%d",&x,&n);
clrscr();
for(i=0;i<=n;i++)
{
sum+=pow(x,i);
}
printf("The sum of given equation is %d",sum);
}
Output:
18. Write a C program to convert a Roman numeral ranging from I to L to its decimal
equivalent.

Aim: A C program to convert a Roman numeral ranging from I to L to its decimalequivalent.

Program:

#include<stdio.h>
#include<conio.h>
#include<string.h>
#include<stdlib.h>

void main()
{
int *a,len,i,j,k;char
*rom; clrscr();
printf("Enter the Roman Numeral:");
scanf("%s",rom);

len=strlen(rom);

for(i=0;i<len;i++)
{
if(rom[i]=='I')
a[i]=1;
else if(rom[i]=='V')
a[i]=5;
else if(rom[i]=='X')
a[i]=10;
else if(rom[i]=='L')
a[i]=50;
else
{
printf("\nInvalid Value");
getch();
exit(0);
}
}
k=a[len-1];

for (i=len-1; i>0; i--)


{
if(a[i]>a[i-1])
k=k-a[i-1];
else if(a[i]==a[i-1] || a[i]<a[i-1])
k=k+a[i-1];
}
printf("\nIts Decimal Equivalent is:");
printf("%d",k);
getch();
}

Output:
19. Write a C program that converts a number ranging from 1 to 50 to Roman equivalent Aim:

program that converts a number ranging from 1 to 50 to Roman equivalent Program:

#include <stdio.h> int


main(void)
{
int num, rem; printf("Enter a number: ");
scanf("%d", &num);

printf("Roman numerals: ");

while(num != 0)
{
if (num == 50) // 50 - l
{
printf("l");num -=
50;
}
else if (num >= 40) // 40 – xl
{
printf("xl");num
-= 40;
}
else if (num >= 10) // 10 – x
{
printf("x");num
-= 10;
}
else if (num >= 9) // 9 - ix
{
printf("ix");num
-= 9;
}
else if (num >= 5) // 5 - v
{
printf("v");num
-= 5;
}
else if (num >= 4) // 4 – iv
{
printf("iv");num
-= 4;
}
else if (num >= 1) // 1 – i
{
printf("i");num
-= 1;
}
}
return 0;
}

Output
20. Write a C program to find the minimum, maximum and average in an array of
integers.

Aim: program to find the minimum, maximum and average in an array ofintegers.

Program:

#include<stdio.h>
#include<conio.h> int
main()
{

int i,n,num[20],min=0,max=0;
float sum=0.0,avg=0.0;

clrscr();

printf("Enter how many number of elements you want to store");


scanf("%d",&n);

for(i=0;i<n;i++)
{
printf("Enter a[%d] value",i);
scanf("%d",&num[i]);
}
min = max = num[0];
for(i=0;i<n;i++)
{
sum+=num[i];
if(num[i]<min)
min =num[i];
if(num[i]>max)
max = num[i];
}
avg = sum/i;

printf("The minimum element of an array is %d\n",min);


printf("The Maximum element of an array is %d\n",max);
printf("The average of array elements is %f\n",avg); return;
}

Output:
21. Write a C program to determine if the given string is a palindrome or not (Spelled same
in both directions with or without a meaning like madam, civic, noon, abcba, etc.)

Aim: program to determine if the given string is a palindrome or not

Program:

void main()
{
char str[10],strrev[10]; int
i,j,len;
clrscr();
printf("Enter a string");
scanf("%s",str);
len=strlen(str);
for(i=len-1,j=0;i>=0;i--,j++)
{
strrev[j]=str[i];
//printf("%c",str[i]);
}
strrev[j]='\0';
if(strcmp(str,strrev)==0)
printf("%s is palindrome",str);
else
printf("%s is not palindrome",str);
}

Output:
22. Write a C program that displays the position of a character ch in the string S or – 1 ifS
doesn’t ‘t contains ch.

Aim: program that displays the position of a character ch in the string S or – 1 if S doesn’t ‘t
contains ch.

Program:

#include<stdio.h>
#include<string.h>
#include<conio.h>

void main()
{
char s[30];// t[20];
char *found,t;
clrscr();

/* Entering the main string */


puts("Enter the first string: ");
gets(s);

/* Entering the string whose position or index to be displayed */


puts("Enter the string to be searched: ");
t=getchar();

/*Searching string t in string s */


// found=strstr(s,t);
found =strchr(s,t);
if(found)
printf("Second String is found in the First String at %d position.\n",found-s);
else
printf("-1");
getch();
}

Output:
23. Write a C program to count the lines, words and characters in a given text.

Aim: program to count the lines, words and characters in a given text.

Program:

#include <stdio.h>void
main()
{
char line[81], ctr;
int i,c, end = 0, characters = 0, words = 0, lines = 0;
printf("KEY IN THE TEXT.\n");
printf("GIVE ONE SPACE AFTER EACH WORD.\n");
printf("WHEN COMPLETED, PRESS 'RETURN'.\n\n");
while( end == 0)
{
/* Reading a line of text */
c = 0;
while((ctr=getchar()) != '\n')
line[c++] = ctr;

line[c] = '\0';
/* counting the words in a line */
if(line[0] == '\0')
break ;
else
{
words++;
for(i=0; line[i] != '\0';i++)
if(line[i] == ' ' || line[i] == '\t')
words++;
}
/* counting lines and characters */
lines = lines +1;
characters = characters + strlen(line);
}
printf ("\n");
printf("Number of lines = %d\n", lines);
printf("Number of words = %d\n", words);
printf("Number of characters = %d\n", characters);
}

Output:
24. Write a program through pointer variable to sum of n elements from array.

Aim: program through pointer variable to sum of n elements from array. Program:

#include<stdio.h>void
main()
{
int num[20],*pn,n,i,sum=0;
clrscr();

printf("Enter how many elements you want to store");


scanf("%d",&n);

for(i=0;i<n;i++)
{
printf("Enter %d value",i+1);
scanf("%d",&num[i]);
}
pn = &num[0];

printf("Displaying array elements through pointer variable\n");


for(i=0;i<n;i++)
{
sum+=*(pn+i);
printf("%d element is %d\n",i+1,*(pn+i));
}
printf("The sum of array elements through pointer variable is %d",sum);
}

Output:
25. Write a program for reading elements using pointer into array and display the valuesusing
array.

Aim: program for reading elements using pointer into array and display the values usingarray.

Program:

#include<stdio.h>void
main()
{
int num[20],*pn,n,i;
clrscr();

printf("Enter how many elements you want to store");


scanf("%d",&n);

pn = num;

for(i=0;i<n;i++)
{
printf("Enter %d value",i+1);
scanf("%d",(pn+i));
}

printf("The array elements are\n");


for(i=0;i<n;i++)
{
printf("%d element is %d\n",i+1,num[i]);
}
}

Output:
26. Write a program for display values reverse order from array using pointer.

Aim: Write a program for display values reverse order from array using pointer.

Program:

#include<stdio.h>void
main()
{
int num[20],*pn,n,i;
clrscr();

printf("Enter how many elements you want to store");


scanf("%d",&n);

for(i=0;i<n;i++)
{
printf("Enter %d value",i+1);
scanf("%d",&num[i]);
}
pn = &num[0];

printf("Displaying array elements in reverse order through pointer variable\n");


for(i=n-1;i>=0;i--)
{
printf("%d element is %d\n",i+1,*(pn+i));
}
}

Output:
27. Write a C program to display the contents of a file to standard output device.

Aim: C program to display the contents of a file to standard output device.

Program:

#include <stdio.h>
#include <conio.h>
#include <process.h>

void main(int argc, char *argv[])


{
FILE *fs;char
ch; clrscr();

if(argc!=2)
{
puts("Invalid number of arguments.");
exit(0);
}

fs = fopen(argv[1],"r");

if(fs==NULL)
{
puts("Source file cannot be opened.");
exit(0);
}

while(1)
{
ch=fgetc(fs);

if (ch==EOF)
break;
else
putch(ch);
}

fclose(fs);
getch();
}

Output: C:\turboc3\source>29_file abc


Welcome to C
28. Write a C program which copies one file to another, replacing all lowercase characterswith
their uppercase equivalents.

Aim: C program copies contents of one file to another by replacing all lowercase
characters with their uppercase equivalents.

Program:

#include<stdio.h>void
main()
{
char ch;
FILE *fp1,*fp2;
clrscr();
fp1 = fopen("cbi","r");
if(fp1 == NULL)
{
printf("File is not opened properly");
exit(0);
}
fp2 = fopen("lmn","w");
if(fp2 == NULL)
{
printf("File is not opened properly");
exit(0);
}

while((ch=fgetc(fp1))!=EOF)
{
if(ch>=97 && ch<=122)
{
ch=ch-32;
fputc(ch,fp2);
}
else fputc(ch,fp2);
}
fcloseall();
}

Output:

C:\turboc3\source> type abc


Welcome to C
C:\turboc3\source> type xyz
WELCOME TO C
29. Write a C program to count the number of times a character occurs in a text file. The file
name and the character are supplied as command line arguments.

Aim: C program to count the number of times a character occurs in a text file.

Program:

#include<stdio.h>
void main(int argc,char* argv[])
{
char ch;
int count=0;FILE
*fp1; clrscr();
if(argc!=3)
{
printf("Invalid number of arguments");
exit(0);
}
fp1 = fopen(argv[1],"r");
if(fp1 == NULL)
{
printf("File is not opened properly");
exit(0);
}

while((ch=fgetc(fp1))!=EOF)
{
if(ch==*argv[2])
{
count++;
}

}
printf("The %c is occured %d times in the file %s",*argv[2],count,argv[1]);
fclose(fp1);
}

Output:
C:\turboc3\source>31_file abc l
The l is occurred 2 times in the file abc
30. Write a C program that does the following: It should first create a binary file and store 10
integers, where the file name and 10 values are given in the command line. (hint: convert
the strings using atoi function) Now the program asks for an index and a value from the
user and the value at that index should be changed to the new value in the file. (hint: use
fseek function) The program should then read all 10 values and print them back.

Aim: C program that create a binary file and store 10 integers, where the file name and 10
values are given in the command line. The program asks for an index and a value from the
user and the value at that index should be changed to the new value inthe file. The program
read all 10 values and print them back.

Program:
#include<stdio.h> #include<stdlib.h>
void main(int argc,char* argv[])
{
FILE *fp1,*fp2;
int i,n,j=0,a[100],b[20],index=0,vindex=0;

if(argc!=12)
{
printf("Invalid number of arguments");
exit(0);
}

fp1 = fopen(argv[1],"wb");

if(fp1 == NULL)
{
printf("File is not opened properly");
exit(0);
}
i=2;

printf("Data from user:\n");


while(i<=11)
{
a[j]=atoi(argv[i]);
printf("%d\t",a[j]);i++;
j++;
}
fwrite(&a,sizeof(int),10,fp1);

printf("Enter the index and value for index");


scanf("%d%d",&index,&vindex);

fseek(fp1,index,0);
fwrite(&vindex,sizeof(int),1,fp1);
fclose(fp1);

fp1 = fopen(argv[1],"r+b");

if(fp1 == NULL)
{
printf("File is not opened properly");
exit(0);
}

n = fread(&b,sizeof(int),10,fp1); i=0;
printf("data from file:\n");
while(i<n)
{
printf("%d\t",b[i]);i++;
}
fclose(fp1);
}
Output:
C:\turboc3\source>32_file dataint 1 2 3 4 5 6 7 8 9 10 Data
from user:
1 2 3 4 5 6 7 8 9 10
Enter the index and value for index 2 34 Data
from file:
1 34 3 4 5 6 7 8 9 10
31. Write a C program to merge two files into a third file (i.e., the contents of the first file
followed by those of the second are put in the third file).

Aim: C program to merge two files into a third file.

Program:

#include <stdio.h>
#include <conio.h>
void main(int argc, char *argv[])
{
FILE *f1,*f2,*f3;
char ch;
clrscr();
if(argc!=4)
{
puts("Invalid number of arguments.");
exit(0);
}
f1 = fopen(argv[1],"r");
if(f1==NULL)
{
puts("Source file cannot be opened.");
exit(0);
}
f2 = fopen(argv[2],"r");
if (f2==NULL)
{
puts("Source file cannot be opened.");
exit(0);
}
f3 = fopen(argv[3],"w");
if (f3==NULL)
{
puts("Target file cannot be opened.");
exit(0);
}
while((ch=fgetc(f1))!=EOF)
{
fputc(ch,f3);
}
while((ch=fgetc(f2))!=EOF)
{
fputc(ch,f3);
}
fclose(f1);
fclose(f2);
fclose(f3);
getch();
}

Output:
C:\turboc3\source>33_file abc pqr lmn
C:\turboc3\source>type abc
Welcome to C
C:\turboc3\source>type pqr File
merge concept
C:\turboc3\source>type lmn
Welcome to C
File merge concept
32. Write a C program that uses functions to perform addition of two matrices.

Aim: program to perform addition of two matrices using function.

Program:

#include <stdio.h>

void mat_add(int first[10][10],int second[10][10],int r,int c);

void main()
{
int r, c, i, j, mat1[10][10], mat2[10][10], mat3[10][10];

clrscr();

printf("Enter the number of rows and columns of matrix 1 and 2\n");


scanf("%d%d", &r, &c);

printf("Enter the elements of first matrix\n");


for (i = 0; i < r; i++)
for (j = 0; j < c; j++)
scanf("%d", &mat1[i][j]);

printf("Enter the elements of second matrix\n");


for (i = 0; i < r; i++)
for (j = 0; j < c; j++)
scanf("%d", &mat2[i][j]);

mat_add(mat1,mat2,r,c);
}

void mat_add(int first[10][10],int second[10][10],int r,int c)


{
int i,j,sum[10][10];
printf("Sum of entered matrices:-\n");
for (i = 0; i < r; i++)
{
for (j = 0 ; j < c; j++)
{
sum[i][j] = first[i][j] + second[i][j];
printf("%d\t", sum[i][j]);
}
printf("\n");
}
}

Output:
33. Write a C program that uses function to perform the multiplication of two matrices

Aim: Program to perform the multiplication of two matrices using function.

Program:

#include<stdio.h>

void mat_mul(int a[10][10],int b[10][10],int r1,int c1,int c2);

void main()
{
int i,j,r1,c1,r2,c2,a[10][10],b[10][10],*c;
clrscr();
printf("Input rows and columns of A matrix:");
scanf("%d%d",&r1,&c1);
printf("Input rows and columns of B matrix:");
scanf("%d%d",&r2,&c2);
if(c1==r2)
{
printf("matrices can be multiplised\n");
printf("resultant matrix is %d*%d\n",r1,c2);
printf("Input A matrix\n");
for(i=0;i<r1;i++)
for(j=0;j<c1;j++)
{
printf("Enter a[%d][%d] value",i,j);
scanf("%d",&a[i][j]);
}

printf("Input B matrix\n");
for(i=0;i<r2;i++)
for(j=0;j<c2;j++)
{
printf("Enter b[%d][%d] value",i,j);
scanf("%d",&b[i][j]);
}

mat_mul(a,b,r1,c1,c2);
}
else
{
printf("Matrices cannot be multiplied.");
}
}
void mat_mul(int a[10][10],int b[10][10],int r1,int c1,int c2)
{
int i,j,k,c[10][10];
for(i=0;i<r1;++i)
{
for(j=0;j<c2;++j)
{
c[i][j]=0;
for(k=0;k<c1;++k)
c[i][j]=c[i][j]+a[i][k]*b[k][j];
}
}
clrscr();
printf("\n =====Matrix Multiplication=====\n");
printf("Resultant of two matrices:\n");
for(i=0;i<r1;i++)
{
for(j=0;j<c2;j++)
printf("%5d",c[i][j]);
printf("\n");
}
}

Output:
34. Write a C program that uses functions to perform Transpose of a matrix with
memory dynamically allocated for the new matrix as row and column counts may
not be same.

Aim: Transpose of a matrix with memory dynamically allocated for the new matrix as row
and column counts may not be same.

Program:
#include<stdio.h>
#include<conio.h>

void tra_mat(int a[10][10],int r,int c);

void main()
{
int a[10][10],*b,i,j,r,c,tr,tc;

clrscr();

printf("Enter number of rows and columns you want");


scanf("%d%d",&r,&c);

for(i=0;i<r;i++)
{
for(j=0;j<c;j++)
{
printf("Enter a[%d][%d] element",i,j);
scanf("%d",&a[i][j]);
}
}
printf("Given Matrix is \n");
for(i=0;i<r;i++)
{
for(j=0;j<c;j++)
printf("%d\t",a[i][j]);
printf("\n");
}
tra_mat(a,r,c);
}

void tra_mat(int a[10][10],int r,int c)


{
int tr,tc,i,j,*b;

tr =c;
tc =r;
b =(int*)malloc(tr*tc*sizeof(int));
for(i=0;i<c;i++)
{
for(j=0;j<r;j++)
{
*(b+i*tc+j)=a[j][i];
}
}

printf("Transposed Matrix is\n");


for(i=0;i<tr;i++)
{
for(j=0;j<tc;j++)
printf("%d\t",*(b+i*tc+j));
printf("\n");
}
}

Output:
35. Write a function to compute mean, variance, Standard Deviation, sorting of n
elements in single dimension array.

Aim: a function to compute mean, variance, Standard Deviation, sorting of n elements insingle
dimension array.

Program:

#include <stdio.h>
#include <math.h>

#define MAXSIZE 10

void mean_var_sd_sort(int [],int n);

int i,j,n;

void main()
{
int x[MAXSIZE];
clrscr();
printf("Enter the value of N \n");
scanf("%d", &n);

printf("Enter %d real numbers \n", n);


for (i = 0; i < n; i++)
{
scanf("%d", &x[i]);
}
mean_var_sd_sort(x,n);
}

void mean_var_sd_sort(int x[MAXSIZE],int n)


{
float average, variance, std_deviation,sum = 0,sum1=0, temp=0;

/* Sorting elements */
for (i = 1; i <=n-1; i++)
{
for(j=i;j>0&&x[j-1]>x[j];j--)
{
temp=x[j];
x[j]=x[j-1];
x[j-1]=temp;
}
}

clrscr();
printf("The sorted array elements are\n");
for(i=0;i<n;i++)
{
printf("%d\t",x[i]);
sum = sum+x[i];
}

average = sum / (float)n;

for (i = 0; i < n; i++)


{
sum1 = sum1 + pow((x[i] - average), 2);
}
variance = sum1 / (float)n;
std_deviation = sqrt(variance);
printf("\n Average of all elements = %.2f", average);
printf("\n variance of all elements = %.2f", variance);
printf("\n Standard deviation = %.2f", std_deviation);
}

Output:
36. Write C programs that use both recursive and non-recursive functions to find the factorial of
a given integer.

Aim: programs that use both recursive and non-recursive functions to find the factorial ofa
given integer.

#include<stdio.h>
#include<conio.h>

int rec_factorial(int);
int non_rec_factorial(int);

void main()
{
int n,rfact,nrfact;
clrscr();

printf("Enter n value");
scanf("%d",&n);

rfact=rec_factorial(n);
printf("The factorial of %d is %d using recursive\n",n,rfact);

nrfact=non_rec_factorial(n);
printf("The factorial of %d is %d using non-recursive\n",n,nrfact);
}

int rec_factorial(int n)
{
if(n==0)
return 1;else
return n*rec_factorial(n-1);
}

int non_rec_factorial(int n)
{
int fact=1,i;
for(i=1;i<=n;i++)
fact*=i;
return fact;
}

Output:
37. Write C programs that use both recursive and non-recursive functions to find the GCD
(greatest common divisor) of two given integers.

Aim: programs that use both recursive and non-recursive functions to find the GCD
(greatest common divisor) of two given integers.

Program:

#include<stdio.h>
#include<conio.h>
#include<math.h>

unsigned int GcdRecursive(unsigned m, unsigned n);


unsigned int GcdNonRecursive(unsigned p,unsigned q);

int main(void)
{
int a,b,iGcd;
clrscr();

printf("Enter the two numbers whose GCD is to be found: ");scanf("%d%d",&a,&b);

printf("GCD of %d and %d Using Recursive Function is %d\n",a,b,GcdRecursive(a,b));


printf("GCD of %d and %d Using Non-Recursive Function is
%d\n",a,b,GcdNonRecursive(a,b));

getch();
}

/* Recursive Function*/
unsigned int GcdRecursive(unsigned m, unsigned n)
{
if(n>m)
return GcdRecursive(n,m);
if(n==0)
return m;else
return GcdRecursive(n,m%n);
}
/* Non-Recursive Function*/
unsigned int GcdNonRecursive(unsigned p,unsigned q)
{
unsigned remainder;
remainder = p-(p/q*q);
if(remainder==0)
return q;
else
GcdRecursive(q,remainder);
}

Output:
38. Write C programs that use both recursive and non-recursive functions to find x^n

Aim: C programs that use both recursive and non-recursive functions to find x^n

Program:

#include <stdio.h>

int rec_xpowern(int,int);
int non_rec_xpowern(int,int);void

void main()
{
int base, pow, rxpn,nrxpn;clrscr();

printf("Enter base number: ");


scanf("%d", &base);

printf("Enter power number(positive integer): ");


scanf("%d",&pow);

rxpn = rec_xpowern(base,pow);
printf("\nRecursive %d^%d = %d", base, pow,rxpn);

nrxpn = non_rec_xpowern(base,pow);
printf("\nNon Recursive %d^%d = %d", base, pow,nrxpn);
}

int rec_xpowern(int base, int pow)


{
if (pow != 0)
return (base * rec_xpowern(base, pow - 1));
else
return 1;
}

int non_rec_xpowern(int base, int pow)


{
int i,xpn=1;
if(pow == 0)
return 1;
else
for(i=1;i<=pow;i++)
xpn*=base;
return xpn;
}

Output:
39. Write a C program that uses functions to insert a sub-string in to a given main string from a
given position.
Aim: A C program that uses functions to insert a sub-string in to a given main string from a
given position.

Program:

#include <stdio.h>
#include <conio.h>
#include <string.h>

char a[20],b[20],c[20];
int p=0;

void ins_sub_string(char [],char [],int);

void main()
{
clrscr();

puts("Enter First String:");


gets(a);

puts("Enter Second String:");


gets(b);

printf("Enter the position where the item has to be inserted: ");


scanf("%d",&p);

ins_sub_string(a,b,p);
}

void ins_sub_string(char a[],char b[],int p)


{
int r=0,i=0, t=0, x, g, s, n, o;

r = strlen(a);
n = strlen(b);

// Copying the input string into another array


while(i <= r)
{
c[i]=a[i];
i++;
}
s = n+r;
o = p+n;
// Adding the sub-string
for(i=p;i<s;i++)
{
x = c[i];
if(t<n)
{
a[i] = b[t];
t=t+1;
}
a[o]=x;
o=o+1;
}

printf("%s", a);
}
Output:
40. Write a C program that uses functions to delete n Characters from a given position in a
given string.
Aim: A C program that uses functions to delete n characters from a given position in a
given string.

Program:

#include <stdio.h>
#include <conio.h>
#include <string.h>

void delchar(char *x,int a, int b);

void main()
{
char string[10];
int n,pos,p;
clrscr();

puts("Enter the string");


gets(string);
printf("Enter the position from where to delete");
scanf("%d",&pos);
printf("Enter the number of characters to be deleted");
scanf("%d",&n);
delchar(string, n,pos);
getch();
}

// Function to delete n characters


void delchar(char *x,int a, int b)
{
if ((a+b-1) <= strlen(x))
{
strcpy(&x[b-1],&x[a+b-1]);
puts(x);
}
}

Output:
41. Write a C program that uses functions to perform the following operations:
i. Reading a complex number
ii. Writing a complex number
iii. Addition of two complex numbers
iv. Multiplication of two complex numbers

Aim: C program that uses function to read, write, add and multiply two complex numbers.

Program:
#include <stdio.h>
#include <conio.h>
struct complex
{
float real, imag;
}c1,c2,c3;

struct complex read(void);


void write(struct complex);
struct complex add(struct complex, struct complex);
struct complex sub(struct complex, struct complex);
struct complex mul(struct complex, struct complex);
struct complex div(struct complex, struct complex);

void main ()
{
clrscr();
printf("Enter the 1st complex number\n ");
c1 = read();

printf("Enter the 2nd complex number\n");


c2 = read();

clrscr();
printf("\n The 1st complex number is ");
write(c1);
printf("\n The 2nd complex number is ");
write(c2);
printf("\n The Addition of two complex numbers is ");
c3 = add(c1,c2);
write(c3);

printf("\n The Substraction of two complex numbers is ");


c3 = sub(c1,c2);
write(c3);

printf("\n The Multiplication of two complex numbers is ");


c3 = mul(c1,c2);
write(c3);

printf("\n The Division of two complex numbers is ");


c3 = div(c1,c2);
write(c3);

getch();
}

struct complex read(void)


{
struct complex t;
printf("Enter the real part\n");
scanf("%f", &t.real);
printf("Enter the imaginary part\n");
scanf("%f", &t.imag);
return t;
}

void write(struct complex a)


{
printf(" %.1f + i %.1f\n", a.real, a.imag);
}
struct complex add(struct complex p, struct complex q)
{
struct complex t;
t.real = (p.real + q.real);
t.imag = (p.imag + q.imag);
return t;
}

struct complex sub(struct complex p, struct complex q)


{
struct complex t;
t.real = (p.real - q.real);
t.imag = (p.imag - q.imag);
return t;
}

struct complex mul(struct complex p, struct complex q)


{
struct complex t;
t.real=(p.real * q.real) - (p.imag * q.imag);
t.imag=(p.real * q.imag) + (p.imag * q.real);
return t;
}

struct complex div(struct complex p, struct complex q)


{
struct complex t;
t.real = ((p.imag * q.real) - (p.real * q.imag)) / ((q.real * q.real) + (q.imag * q.imag));
t.imag = ((p.real * q.real) + (p.imag * q.imag)) / ((q.real * q.real) + (q.imag * q.imag));
return(t);
}

Output:
42. Write a menu driven C program that allows a user to enter n numbers and then choose
between finding the smallest, largest, sum, or average. The menu and all the choices are to
be functions. Use a switch statement to determine what action to take. Display an error
message if an invalid choice is entered.

Aim: a menu driven C program that allows a user to enter n numbers and then choose between
finding the smallest, largest, sum, or average.

Program:

#include<stdio.h>
#include<conio.h>

void menu();
int smallest(int a[],int n);
int largest(int a[],int n);
int sum(int a[],int n);
float average(int a[],int n);

void main()
{
int *a,n,i,ch,small,large,soe;
float avg;

clrscr();

printf("Enter How many numbers you want");


scanf("%d",&n);

for(i=0;i<n;i++)
{

printf("Enter %d number ",i+1);


scanf("%d",&a[i]);
}

clrscr();

menu();

printf("Enter your choice");


scanf("%d",&ch);
switch(ch)
{
case 1:
small = smallest(a,n);
printf("Smallest number is %d",small);
break;

case 2:
large = largest(a,n);
printf("Largest number is %d",large);
break;

case 3:
soe = sum(a,n);
printf("Sum of elements is %d",soe);
break;

case 4:
avg = average(a,n);
printf("Average of elements is %d",avg);
break;

default:
printf("Invalid Choice");
break;
}

void menu()
{
printf("1. smalest number\n");
printf("2. largest number\n");
printf("3. sum of all numbers\n");
printf("4. average of all numbers\n");
}

int smallest(int a[],int n)


{
int i,small=a[0];

for(i=1;i<n;i++)
{
if(a[i]<small)
small = a[i];
}
return small;
}

int largest(int a[],int n)


{
int i, large=a[0];

for(i=1;i<n;i++)
{
if(a[i]>large)
large = a[i];
}
return large;
}

int sum(int a[],int n)


{
int i,sum=0;

for(i=0;i<n;i++)
sum+=a[i];
return sum;
}

float average(int a[],int n)


{
int i;
float sum=0.0;

for(i=0;i<n;i++)
sum+=a[i];
return (sum/n);
}

Output:

You might also like