C Programming
C Programming
C Programming
write a c program to take input of name, rollno and marks obtained by a student in 4 subjects of 100
marks each and display the name, rollno with percentage score secured.
AIM:
Create a c program to take input of name ,rollno and marks obtained by a student in 4 subjects of 100
marks each and display the name,rollno with percentage score secured
PROCEDURE:
STEP 1: Start the program
STEP 2: Declare the variables
STEP 3: Get the input from the user like name ,rollno and four subjects marks
STEP 4: Calculate the values of total and percentage
STEP 5: Display the program
STEP 6: Stop the program
SOURCE CODING:
OUTPUT:
RESULT:
Thus the following output was successfully executed.
2. write a c program to input two number and display the maximum number.
AIM:
Create a c program to input two number and display the maximum number.
PROCEDURE:
STEP 1: Start the program
STEP 2: Declare the variables
STEP 3: Get the input of the two numbers
STEP 4: Check whether a two inputs are different
STEP 5: Display the program
STEP 6: Stop the program
SOURCE CODING:
OUTPUT:
RESULT:
Thus the following output was successfully executed.
3.write a c program to find whether a character is consonant or vowel using switch statement.
AIM:
Create a c program to find whether a character is consonant or vowel using switch statement.
PROCEDURE:
STEP 1: Start the program
STEP 2: Declare the variables
STEP 3: Get the input of the character
STEP 4: Check whether a character is consonant or vowel
STEP 5: Display the program
STEP 6: Stop the program
SOURCE CODING:
OUTPUT:
RESULT:
Thus the following output was successfully executed.
AIM:
Create a c program to print positive integers from 1 to 10.
PROCEDURE:
STEP 1: Start the program
STEP 2: Declare the variables
STEP 3: Check the for loop (i=1;i<10;i++) for print the positive integers from 1 to 10
STEP 4: Display the program
STEP 5: Stop the program
SOURCE CODING:
OUTPUT:
RESULT:
Thus the following output was successfully executed
AIM:
Create a c program to check whether a number is palindrome or not.
PROCEDURE:
STEP 1: Start the program
STEP 2: Declare the variables
STEP 3: Check whether a number is palindrome or not
STEP 4: Display the program
STEP 5: Stop the program
SOURCE CODING:
OUTPUT:
RESULT:
Thus the following output was successfully executed
AIM:
Create a c program to generate Fibonacci series.
PROCEDURE:
STEP 1: Start the program
STEP 2: Declare the variables
STEP 3: Get the input of number of terms
STEP 4: Check whether a series is correct
STEP 5: Display the program
STEP 6: Stop the program
SOURCE CODING:
OUTPUT:
RESULT:
Thus the following output was successfully executed
7.write a c program to insert 5 elements into an array and print the elements of the array.
AIM:
Create a c program to insert 5 elements into an array and print the elements of the array.
PROCEDURE:
STEP 1: Start the program
STEP 2: Declare the variables
STEP 3: Get the input of 5 elements into an array and print the elements of the array
STEP 4: Check whether a array was printed which user given.
STEP 5: Display the program
STEP 6: Stop the program
SOURCE CODING:
OUTPUT:
RESULT:
Thus the following output was successfully executed
PROCEDURE:
STEP 1: Start the program
STEP 2: Declare the variables
STEP 3: Get the input of 5 elements into an array and print the elements of the array
STEP 4: Check whether a array was printed was reverse which user given.
STEP 5: Display the program
STEP 6: Stop the program
SOURCE CODING:
OUTPUT:
RESULT:
Thus the following output was successfully executed
PROCEDURE:
STEP 1: Start the program
STEP 2: Declare the variables
STEP 3: Get the input of 5 elements into an array and print the elements of the array
STEP 4: Check whether a array was printed which user given.
STEP 5: Display the program
STEP 6: Stop the program
SOURCE CODING:
OUTPUT:
RESULT:
Thus the following output was successfully executed
10.write a c program to compare two strings without using string library functions.
AIM:
Create a c program to compare two strings without using string library functions.
PROCEDURE:
STEP 1: Start the program
STEP 2: Declare the variables
STEP 3: Get the input of two string from the user
STEP 4: Check whether a two strings without using string library functions
STEP 5: Display the program
STEP 6: Stop the program
SOURCE CODING:
OUTPUT:
RESULT:
Thus the following output was successfully executed
AIM:
Create a c program to generate Fibonacci series using recursive function.
PROCEDURE:
STEP 1: Start the program
STEP 2: Declare the variables
STEP 3: Get the input from the user
STEP 4: Check whether a series are correct or wrong.
STEP 5: Display the program
STEP 6: Stop the program
SOURCE CODING:
OUTPUT:
RESULT:
Thus the following output was successfully executed
AIM:
Create a c program to find power of any number using recursion.
PROCEDURE:
SOURCE CODING:
OUTPUT:
RESULT:
Thus the following output was successfully executed
13.write a c program to add, subtract, multiply and divide two integers using user defined type function with
return type.
AIM:
Create a c program to add, subtract, multiply and divide two integers using user defined type function
with return type.
PROCEDURE:
SOURCE CODING:
OUTPUT:
RESULT:
Thus the following output was successfully executed
14.write a c program to swap two integer using call by value and call by Reference methods of passing
Arguments to a function
AIM:
Create a c program to swap two integer using call by value and call by Reference methods of passing
Arguments to a function
PROCEDURE:
SOURCE CODING:
OUTPUT:
RESULT:
Thus the following output was successfully executed
15.write a c program to find biggest among three numbers using pointer.
AIM:
Create a c program to find biggest among three numbers using pointer.
PROCEDURE:
SOURCE CODING:
OUTPUT:
RESULT:
Thus the following output was successfully executed
16.write a c program to compare two strings using pointers.
AIM:
Create a c program to compare two strings using pointers
PROCEDURE:
SOURCE CODING:
OUTPUT:
RESULT:
Thus the following output was successfully executed
AIM:
Create a c program to create, declare and initialize structure.
PROCEDURE:
SOURCE CODING:
OUTPUT:
RESULT:
Thus the following output was successfully executed
AIM
Create a c program to declare, initialize an UNION.
PROCEDURE:
SOURCE CODING:
OUTPUT:
RESULT:
Thus the following output was successfully executed
19.write a c program to create a file called emp.rec and store information about a person ,in terms of his name,
age and salary.
AIM:
Create a c program to create a file called emp.rec and store information about a person ,in terms of his
name, age and salary
PROCEDURE:
RESULT:
Thus the following output was successfully executed
PROCEDURE:
SOURCE CODING:
OUTPUT:
RESULT: