JNTUK R16 C PROGRAMMING LAB


Understanding LINUX commands.

EXERCISE – 2

a) Write a C program to perform adding, subtraction, multiplication and division of two numbers from command line.

b) Write a C program to convert Celsius to Fahrenheit and vice verse.

EXERCISE – 3

a) write a C program to find whether the given year is a leap year or not.

b) Write a C program to add digits and multiplication of a number.

EXERCISE – 4

a)  Write a C program to find whether the given number is prime or not

b)  Write a C program to find whether the given number is armstrong or not

EXERCISE – 5

a)Write a C program to print Floyd triangle.

b)Write a C program to print Pyramid triangle.

c)Write a C program to print Pascal triangle.

EXERCISE – 6

a)Write a C program to reverse of a given number.

b)Write a C program to check whether the given number is Palindrome or not.

EXERCISE – 7

a)Write a C program to make a simple calculator to add, subtract, multiply, divide or modulo divide using switch case.

b)Write a C program to convert decimal to binary and vice versa.

c)Write a C program demonstrating of parameters passing in functions and returning values.

EXERCISE – 8

Write a C program illustrating Fibonacci with Recursion and without Recursion.

EXERCISE – 9

Write a C program illustrating Factorial with recursion and without recursion.

EXERCISE – 10

a)Write a C program to find an element in the given array using linear search.

b)Write a C program to sort elements of an array in ascending order.

EXERCISE – 11

a)Write a C program to perform sum of two matrices.

b)Write a C program to perform multiplication of two matrices.

EXERCISE – 12

Write a C program to store student information using structures.

EXERCISE – 13

a)Write a C program to access elements of an array using pointer.

b)Write a C program to find sum of array elements using pointer.

EXERCISE – 14

a)Write a C program to find sum of n elements allocate memory dynamically using malloc() function.

b)Write a C program to find sum of n elements allocate memory dynamically using calloc() function.

EXERCISE – 15

Write a C program implementation of string manipulation operations with library function.

EXERCISE – 16

a)Write a C program to find length of given string without library function.

b)Write a C program that implements strcpy without library function.

c)Write a C program that implements strcmp without library function.

d)Write a C program that implements strcat without library function.

EXERCISE – 17

a)Write a C program to open a file and to print its contents on screen.

b)Write a C program to copy files.

EXERCISE – 18

Write a C program to merge contents of two files into single file.