C PROGRAMMING LAB PROGRAMS
EXPERIMENT - 1
Construct Flowcharts for the following through Raptor:
iii) Calculate the average of n numbers.
EXPERIMENT - 2
B) Write a c program to find the largest of three numbers using ternary operator.
C) Write a c program to swap two numbers without using a temporary variable.
EXPERIMENT - 3
EXPERIMENT - 4
EXPERIMENT - 5
C) Write a C Program to check whether the given number is Armstrong number or not.
Eg: 153 = (1)3 + (5)3 + (3)3 153 = 1 + 125 + 27 153 = 153
EXPERIMENT - 6
A) Write a C program to interchange the largest and smallest numbers in the array.
EXPERIMENT - 7
a) Write a C Program to find sum of following series for a given n value.
i. 1+(1+2)+(1+2+3)+(1+2+3+4)+(1+2+3+4+5)+...+(1+2+...+n).
ii. 1+(2+2)+(3+3+3)+(4+4+4+4)+…+(n+n+n+n..+n).
b) Write a C Program to display following patterns for a given n value
EXPERIMENT - 8
Draw a flow chart using Raptor and write C programs that use both recursive and non-recursive Functions for the following
i) To find the factorial of a given integer
ii) To find the GCD greatest common divisor of two given integers
EXPERIMENT - 9
a) Write a C Program to find Fibonacci sequence.
b) Write C programs illustrating call by value and call by reference concepts
EXPERIMENT - 10
Write C Programs for the following string operations without using the built in functions - to concatenate two strings
a) To append a string to another string
EXPERIMENT - 11
Write C Programs for the following string operations without using the built in functions
A) To find whether a given string is palindrome or not
EXPERIMENT - 12
Write a C program that uses functions to perform the following operations:
a) To insert a sub-string in to given main string from a given position
b) To delete n Characters from a given position in a given string.
C) To replace a character of string either from beginning or ending or at a specified location
EXPERIMENT - 13
A) Write a C program to implement Taylor series method
B) Write a C program to implement Euler’s method
C) Write a C program to implement Runge kutta method
EXPERIMENT - 14
A) Write C Program to reverse a string using pointers
B) Write a C Program to compare two arrays using pointers
C) Write a C program to swap two numbers using pointers
EXPERIMENT - 15
EXPERIMENT - 16
Examples which explores the use of structures, union and other user defined variables
EXPERIMENT - 17
A) Write a C program which copies one file to another.
b) Write a C program to count the number of characters and number of lines in a file.