C- Programming Language
Week – 1
Programming Questions
Q. 1 Write a program to accept height and base of triangle and calculate area of
Triangle
Note: area =(h*b)/2
Q. 2 Write a program to accept radius of circle and calculate area of circle
Note: area =pi * r2
Q. 3 Write a program to find the lowest marks of three students using conditional
operator.
Q. 4 Write a program to Calculate Compound Interest.
Q. 5 Write a program to Calculate Cube of a Number.
C- Programming Language
Week – 2
Programming Questions
Q. 1 Write a program to interchange two values by using Assignment Operator.
Q. 2 Write a program to interchange two values by using Arithmetic Operator.
Q. 3 Write a program to interchange two values by using Bitwise Operator.
Q. 4 Write a program to find the size of all data types (Int, Float, Char, Double, Long
Double, Short Int etc.).
Q. 5 Write a program to find out whether input number is even or odd without using
arithmetic operators.
C- Programming Language
Week – 3
Programming Questions
Q. 1 Write a C program to check whether a given number is even or odd.
Q. 2 Write a C program to check whether a given number is positive or negative.
Q. 3 Write a C program to find whether a given year is a leap year or not.
Q. 4 Write a C program to find the largest of three numbers.
Q. 5 Write a C program to read temperature in centigrade and display a suitable
message according to the temperature state below:
a. Temp < 0 then Freezing weather
b. Temp 0-10 then Very Cold weather
c. Temp 10-20 then Cold weather
d. Temp 20-30 then Normal in Temp
e. Temp 30-40 then Its Hot
f. Temp >=40 then Its Very Hot
Q. 6 Write a C program to read any digit and display it in the word.
Q. 7 Write a C program to create a Simple Calculator using a switch case.
Q. 8 Write a C program using C Switch…Case to Calculate the Area of Rectangle/
Circle/ Triangle
H.O.T.S Questions
Q. 9 Write a C program to calculate the sum and average of positive numbers. If the
user enters a negative number, the sum and average are displayed.
Q. 10 Write a C program to design a digital clock.
Q. 11 Write a C program to find the sum of digits of a number until a single digit is
occurred.
C- Programming Language
Week – 4
Programming Questions
Q. 1 Write a C program to print multiplication table of a number.
Q. 2 Write a C program to calculate factorial of a number.
Q. 3 Write a C program to check whether a number is palindrome or not.
Q. 4 Write a C program to count frequency of digits in a given number.
Q. 5 Write a C program to find HCF(GCD) AND LCM of two numbers.
Q. 6 Write a C program to print all prime numbers between 1 to n.
Q. 7 Write a C program to print Fibonacci series up to n terms.
Q. 8 Write a C program to print Armstrong numbers from 1 to n AND check a given
number is Armstrong numbers or not.
H.O.T.S Questions
Q. 9 Write a C program to print all Perfect numbers between 1 to n AND Check a
given number is Perfect numbers or not.
Q. 10 Write a C program to print all Strong Numbers between 1 to n.
C- Programming Language
Week – 5
Programming Questions
Q. 1 Write a program to print the following patterns:
a. e. i.
b. f. j.
c. g. k.
d.
h. l.
H.O.T.S Questions
m.
n.
C- Programming Language
Week – 6
Programming Questions
Q. 1 Write a menu driven program to insert and delete elements of kth position to
an array of size N.
Q. 2 Write the program to print the biggest and smallest element in an array.
Q. 3 Write the program to print the sum and average of an array.
Q. 4 Write the program to sort an array using bubble sort.
Q. 5 Write the program to search an element using linear search as well as binary
search.
Q. 6 Take an array of 20 integer inputs from user and print the following:
a. number of positive numbers
b. number of negative numbers
c. number of odd numbers
d. number of even numbers
e. number of 0.
Q. 7 Take an array of 10 elements. Split it into middle and store the elements in
two different arrays. E.g.-
INITIAL array:
58, 24, 13, 15, 63, 9, 8, 81, 1, 78
After splitting:
58, 24, 13, 15, 63
9, 8, 81, 1, 78
Q. 8 Write the program to count frequency of each element in an array.
C- Programming Language
Week – 7
Programming Questions
Q. 1 Write the program to print row major and column major matrix.
Q. 2 Write the program to print sum of a whole matrix.
Q. 3 Write a program to add and multiply two 3x3 matrices. You can use 2D array
to create a matrix.
Q. 4 Write the program to print sum of all diagonal elements, upper triangular
matrix and lower triangular matrix.
Q. 5 Write the program to find the frequency of odd and even elements in matrix.
Q. 6 Write the program to find sum of each row and sum of each column of
matrix.
Q. 7 Initialize a 2D array of 3*3 matrix. E.g.-
1 2 3
2 3 4
3 4 5
Q. 8 A square matrix, one having the same number of rows and columns, is called
a diagonal matrix if it’s only non-zero elements are on the diagonal from
upper left to lower right. It is called upper triangular matrix if all elements
bellow the diagonal are zeroes, and lower triangular matrix, if all the elements
above the diagonal are zeroes. Write a program that reads a matrix and
determines if it is one of the above mentioned three special matrices.
Q. 9 Write the program to check whether the matrix is sparse matrix or not.
C- Programming Language
Week – 8
Programming Questions
Q. 1 Write a C program to create, initialize and use pointers.
Q. 2 Write a C program to add two numbers using pointers.
Q. 3 Write a C program to swap two numbers using pointers.
Q. 4 Write a C program to input and print array elements using pointer.
Q. 5 Write a C program to copy one array to another using pointer.
Q. 6 Write a C program to swap two arrays using pointers.
Q. 7 Write a C program to reverse an array using pointers.
Q. 8 Write a C program to add two matrix using pointers.
Q. 9 Write a C program to multiply two matrix using pointers.
C- Programming Language
Week – 9
Programming Questions
Q. 1 Write a C program to Search string.
Q. 2 Write a C program to Reverse words in string.
Q. 3 Write a C program to count vowels, consonants, etc.
Q. 4 Create a program to separate characters in a given string?
Q. 5 Write a program to take two strings from user and concatenate them also add
a space between them using strcat() function.
Sample input: JAI
GLA
Sample output: JAI GLA
Q. 6 Write a C program to take a string from user and make it toggle its case i.e.
lower case to upper case and upper case to lower case.
Sample Input: HElLo wOrlD
Sample output: heLlO WoRLd
Q. 7 Write a C program to take two strings as input from user and check they are
identical or not without using string functions.
Sample input: Jai Gla
Jai Gla
Sample output: Identical
Q. 8 Write a C program to take a list of a student’s names from user by asking
number of students and sort them alphabetical order.
Sample Input:
Bhisham
Jayant
Abhishek
Dhruv
Sample Output:
Abhishek
Bhisham
Dhruv
Jayant
C- Programming Language
Week – 10
Programming Questions
Q. 1 Write a C program to find length of string using pointers.
Q. 2 Write a C program to copy one string to another using pointer.
Q. 3 Write a C program to concatenate two strings using pointers.
Q. 4 Write a C program to compare two strings using pointers.
Q. 5 WAP to find largest among three numbers using pointer
Q. 6 WAP to find largest among three numbers using pointer.
Q. 7 WAP to find factorial of a number using pointer.
Q. 8 Write a program to print largest even number present in an array using
pointer to an array.
Q. 9 WAP to find sum of elements of an array using array of pointer.
Q. 10 WAP to compute simple interest using pointers.
Q. 11 Write a program to print largest even number present in an array using
pointer to an array.
C- Programming Language
Week – 11
Programming Questions
Q. 1 Write a C function to return the maximum of three integers.
Q. 2 Write a C function to check if a given number is prime or not.
Q. 3 Write a C function to compute the factorial of a non-negative integer.
Q. 4 Write a C function to swap the values of two integers in actual arguments.
Q. 5 Write a C function to compute the sum and average of an array of integers.
Q. 6 Write a C function to find the GCD (Greatest Common Divisor) of two non-
negative integers using Euclid's algorithm.
Q. 7 Write a C function to check if a given string is a valid palindrome,
considering only alphanumeric characters and ignoring cases.
Q. 8 Write a C function to calculate the sum and difference of two complex
numbers.
H.O.T.S Questions
Q. 9 Write a C function to find the second largest and second smallest elements in
an array of integers.
Q. 10 Write a C function to find the number of occurrences of each unique element
in an array.