Topic : Basic Programs
- Demonstrate “Hello World” Program in C using Code Blocks.
#include<stdio.h>
int main()
{
printf(“Hello World”);
return 0;
}
For Free, Demo classes Call: 8149467521
Registration Link: Click Here!
- How to calculate Simple interest In C.
#include<stdio.h>
int main()
{
int n,p,r;
double si;
printf(“Enter Principal Amount := “);
scanf(“%d”,&p);
printf(“Enter Rate of Interest := “);
scanf(“%d”,&r);
printf(“Enter Number of Years := “);
scanf(“%d”,&n);
si=(n*p*r)/100;
printf(“Simple Interest is := %f”,si);
return 0;
}
- Find out area of the Square and Rectangle.
#include<stdio.h>
int main()
{
int side,len,bre,s_area,r_area;
printf(“Enter Side for Recangle := “);
scanf(“%d”,&side);
s_area=side*side;
printf(“Enter Length for Rectangle := “);
scanf(“%d”,&len);
printf(“Enter Breadth for Rectangle := “);
scanf(“%d”,&bre);
r_area=len*bre;
printf(“Area of Square is := %d\n”,s_area);
printf(“Area of Rectangle is := %d”,r_area);
return 0;
For Free, Demo classes Call: 8149467521
Registration Link: Click Here!
}
- How to convert Fahrenheit temp in degree Celsius.
- Illustrate the use of Arithmatic Operators.
- Accept three numbers from user and find out greatest
among them using conditional operator.
- How to Swap two numbers with third variable, and without third variable.
8.Calculate otal and average of the five subjects marks.
- How to calculate speed for time and distance.
Speed=(distance/time)
- How to write command line program to find reverse of a number.
Topic : Selection statement
- Demonstrate the use of %(modulus) operator to check a number is even or odd.
- Check eligibility of a person for voting .
- Enter Cost Price and ask whether the user is a student or not.
student and cost price is greater than 500, give discount of 10%
ELSE discount will be 5%.
student and cost price is greater 500 then give discount of 8% ELSE discount will be 2%.
(Take all inputs from USER)
- Accept Percentage from user and check the GRADE
- Above 70% – Grade A
- Between 60% to 70% – Grade B+.
- Between 45% to 60% – Grade B.
- Between 35% to 45% – Grade C.
- Less than 35% – Fail
- How to compare three numbers and find out largest number among three and also find out whether that three numbers are equal or not.(else if ladder)
For Free, Demo classes Call: 8149467521
Registration Link: Click Here!
Topic : Branching statement
- According to the given menu Excecute the program
1: Reverse No.
2: Factorial NO.
3: Armstrong No.
4: Fibbonacci Series.
If user enters wrong choice appropriate message should get displayed.
- Demonstrate switch case for arithmetic operation on two numbers,
i.e. + is for addition
– is for subtraction
Topic : Looping statements
- How to check whether a number is prime or not.
- Calculate sum of even digits from given number.
- Using Nested for print the following pattern :
*
***
*****
*******
*********
- Using Nested for print the following output using jumping statements
1 5
2 4
4 2
5 1
- WAP to print
1 1 1 2
3 2 2 2
3 3 3 4
- GCD of three numbers
- WAP to print
1
1 1
1 0 1
1 0 0 1
1 1 1 1 1
- WAP to convert decimal to binary /binary to octal
Topic : Functions
- Use all four categories of functions for volume of the cylinder
(volume of cylinder: 3.14*r*r*h)
- a) Function without parameters without return value.
- b) Function with parameter without return value.
- c) Function without parameter with return value.
- d) Function with parameters with return value.
- How to calculate factorial of a number using a function. (using recursion)
- WAP to print Fibonacci series.(also using recursion)
- How to check whether a number is Armstrong number.
- How to check whether a number is palindrome.
- WAP to find HCF and LCM of given number using recursion.
Topic : Pointers
- Write a program that declares a double, an int, and char variables. Next declare and initialize a
pointer to each of the three variables. Your program should then print the address of, and value
stored in.
- Demonstrate addition of two floating type numbers by using call by address.
- Demonstrate pointer arithmetic by assigning pointer “ptr” to variable “a” which is
4
Lab Manual
having value as 100 in it.Perform increment operation on pointer ptr like ptr=ptr+2 and
display which address that pointer ptr hold.
Topic : Array
- How to all elements of an array.
- Howto sort array in ascending order.
- How to find greatest and smallest number in an array.
- WAP to find transpose of matrix
- WAP to multiply a 3*3 matrix.
- How to check whether a matrix is upper trianglular or lower triangular.
- Write a program to search particular value in an array and return the index number where it
is located.
- Perform following operations on two matrices with order m*n and p*q.
- Addition of two matrix
- Multiplication of two matrix
- WAP to check whether two matrtices are identical or not.
- Write a program to print all the LEADERS in the array. (An element is LEADER if it is greater
than all the elements to its right side.)
- Sort array using bubble sort
Topic : String
- WAP to compare two strings using strcmp ().
- WAP to concatenate two strings without using library function.
- WAP to convert upper-case string into lower-case and vice versa .Write your own
functions for the same.
- Find a character(or sub-string) in a string without using library function. And print its ascii
Author:- Jyotsna Binjwe
Call the Trainer and Book your free demo class for now!!!
© Copyright 2020 | Sevenmentor Pvt Ltd.