Home Programming Languages c programming basic c programs

# basic c programs

SHARE

basic c programs for Computer Science Engineering ,Information Technology ,Master of Computer Applications and Bachelor of Science students.

Here basic c programs for practicing in LAB for CSE, MCA, IT and BSC students.

Practicing Lab C Languages Programs for CSE, MCA, IT, BSc students.

Write a C Program to Find Whether the Given number is Even or Odd.

Write a C Program to Find Whether the Given Year is a Leap Year or not.

Write a C program to print following pattern up to n lines

Write a C program to print following pattern up to n lines

 * ** *** **** ***** 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5

Write C program to find the distance traveled at regular intervals of time given the values of ‘u’ and ‘a’. The program should provide the flexibility to the user to select his own time intervals and repeat the calculations for different values of ‘u’ and ‘a’.

Write a C Program demonstrating of parameter passing in Functions and returning values.

Write a C Program illustrating Fibonacci series using functions without Recursion.

Write a C Program illustrating Fibonacci series using function with Recursion.

Write a C Program to make a simple Calculator to Add, Subtract, Multiply or Divide Using switch…case.

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

Write C programs that use both recursive and non-recursive functions

1. To solve Towers of Hanoi problem.
2. Write program to calculate probability of head/tail by generating random numbers using random () function.

Write a C Program to compute the values of sin x and cos x and e^x values using Series expansion. (use factorial function) 2’s complement of a number is obtained by scanning it from right to left and complementing all the bits after the first appearance of a 1. Thus 2’s complement of 11100 is 00100.Write a C program to find the 2’s complement of a binary number.

Write a C program to find both the larges and smallest number in a list of integers.

Demonstration of arrays by preforming Search-Linear.

Demonstration of arrays by preforming Sorting-Bubble.

Demonstration of arrays by preforming Selection-sort.

Demonstration of arrays by preforming Operations on Matrix.

2. Multiplication of Two Matrices
3. Checking symmetricity of a square matrix.
4. Calculating transpose of a matrix in- place manner.

Write a C Program to Store Information of a Movie Using Structure.

Write a C Program to Store Information Using Structures with Dynamically Memory Allocation.

Write a C Program to Add Two Complex Numbers by Passing Structure to a Function.

Write a C Program to Multiplication of Two Complex Numbers by Passing Structure to a Function.

Write a C Program to Access Elements of an Array Using Pointer.

Write a C Program to find the sum of numbers with arrays and pointers.

Write a C program to find sum of n elements entered by user. To perform this program, allocate memory dynamically using malloc () function.

Write a C program to find sum of n elements entered by user. To perform this program, allocate memory dynamically using calloc () function. Understand the difference between the above two programs

Implementation of string manipulation operations with library function.
i) copy ii) concatenate iii) length iv) compare

Implementation of string manipulation operations without library function.
i) copy ii) concatenate iii) length iv) compare

Write a C program to determine if the given string is a palindrome or not.

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

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

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

Write a C program that displays the position/ index in the string S where the string T begins, or –1 if S doesn’t contain T.

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

Write a C program to convert a Roman numeral to its decimal equivalent.

Write a C programming code to open a file and to print it contents on screen.

Write a C program to copy files.

Write a C program merges two files and stores their contents in another file.

Write a C program to delete a file.

Write a C program to reverse the first n characters in a file.

Basic C Programs c language basics basics of c c++ basics simple c programs c# basics c++ basic programs simple c++ program basic c interview questions  c language basics notes basic c programming questions c language basics pdf basic c programs for interviews c programming basics pdf basics of c language for beginners