0% found this document useful (0 votes)
25 views21 pages

C Pragramming Theory and Lab Questions Updated

The document is a comprehensive checklist for online accounts, certifications, assignments, and lab assignments related to programming in C. It includes a detailed list of online accounts with their usage status, tasks to complete with due dates, and a series of theory and lab assignments focused on various programming concepts. Additionally, it provides contact information for a training center located in Rajahmundry.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views21 pages

C Pragramming Theory and Lab Questions Updated

The document is a comprehensive checklist for online accounts, certifications, assignments, and lab assignments related to programming in C. It includes a detailed list of online accounts with their usage status, tasks to complete with due dates, and a series of theory and lab assignments focused on various programming concepts. Additionally, it provides contact information for a training center located in Rajahmundry.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Check List

Sn Online Accounts Status Usage


o (Yes/No)
1 Email id Personal * Professional communication
2 Facebook & Instagram Optional
3 LinkedIn Profile * Professional Networking
4 codechef.com * Competitive Coding
5 leetcode.com Competitive Coding
6 hackerrank.com Competitive Coding
7 geekforgeeks.org
8 LMS Access * Self-Paced Learning
9 discord.com Communication app
10 github.com Online Repository to store
programs
11 WhatsApp Group (CCA) Weekly Master Mind
(Personal WhatsApp no) Communication

Certifications to Complete:
Sno Task to Finish Due Date
1 Finish “Computer Basics” and upload the certificate 2 days from
on LinkedIn Joining Date
2 Finish “Programming Basics, Logics & Techniques” 6 days from
Course and upload the certificate on LinkedIn Joining Date
3 Finish Beginner Level Course on C Language @ Code 15 days from
Chef and Upload Certificate on LinkedIn joining date
4 Finish “C Programming Language” and upload on 30 days from
LinkedIn joining date

Assignments to Complete:
Sno Task to Finish Due Date
1 60 Theory Questions Every week 15 questions
2 200 Programs Submission Every week 50 Programs

C/O DATAPRO, Beside UCO Bank, Women’s College Road, Danavaipeth,


Rajahmundry. Ph: 0883-2474088, 9989241515
Theory Assignments
1. What is programming? Why do we need programming?
2. What is algorithm? Write the various criteria used for judging an
algorithm.
3. What is a flowchart? Explain the different symbols used in a flowchart.
4. What is the use of flowchart?
5. Write an algorithm and draw a flowchart to find the biggest of 3 nos.
6. What are the different steps involved in program development.
7. Write short notes on generations of computer languages. [OR] Explain.
i. Low level language
ii. Middle level language
iii. High level language
8. Write the various steps involved in executing a C program and illustrate it
with the help of flowchart.
9. Explain the structure of C program. What are the general
characteristics/features of c language?
10.Write short notes on identifiers in C.
11.What is the purpose of type declarations? What are the components of
type declarations?
12.Write about space requirement for variables of different Data types (Or)
List the entire data types in c. Explain them in detail.
13.What are the different types of integer constants, character Constant,
String constant, etc. (Or) What are constants and explain them in detail.
14.Summarize the standard escape sequence in C. Describe them.
15.What is a variable? Rules for declaring variables.
16.What is an operator? Describe different types of operators that are
included with the ‘C’ language with an example for each.
17.Explain the following?
i. Increment and decrement operator/unary operators
ii. Conditional operators
iii. Bitwise operators
iv. Assignment operators
v. Logical operators
18.Explain the working of Ternary/conditional operator with an example?
19.What does mean by type conversion? Why it is necessary? Explain with an
example.
20.What is meant by operator precedence? What are the relative precedence
and associativity of arithmetic operators?
21.State the rules that are applied while evaluating expressions in automatic
type conversion.

C/O DATAPRO, Beside UCO Bank, Women’s College Road, Danavaipeth,


Rajahmundry. Ph: 0883-2474088, 9989241515
22.What is meant by two-way selection? Explain the different statements
used for implementing two-way selection with Examples? [OR] What are
selection statements? Explain them in detail.
23.What do u mean by simplifying if statements or write about switch case
with examples. (OR) Multi-way Selection.
24.Write about Strings in C. Explain then in detail.
25.What is repetition structure? Explain all the looping structures with
examples.
26.Write about control statements in C. Explain them in detail.
27.Write about break, continue and goto with examples. (jump statements)
28.What is loop initialization and loop update.
29.Explain about Event & Counter controlled loops. (Logical loops).
30.Write the differences between while and do-while. What are the
advantages of for-loop over these two?
31.In what way array is different from ordinary variables. [OR] What is an
array? Explain them in detail.
32.Write about character arrays. And Explain
i. Single dimensional character arrays and
ii. Multi-dimensional character arrays.
33.What are strings built in functions? Explain few String functions in detail.
34.What is the function? Explain about user defined functions in C language.
[OR] What do u mean by functions? Give the structure of the function and
explain about the arguments and their return values.
35.Write short notes on actual arguments and formal Arguments.
36.What are the advantages of using Functions?
37.Explain in detail with an example.
a. Pass by value.
b. Pass by reference.
38.Explain storage classes in C with examples.
39.Distinguish between
a. Actual and formal arguments.
b. Global and local variables.
c. Automatic and static variables.
40.Write about block structure and scope of variables. Illustrate with an
Example.
41.Write Short notes on scope of a variable.
42.What are standard library functions? Illustrate them with suitable
examples.
43.Difference between user-defined functions and built-in Functions.
44.What is recursion? And what are its advantages. Explain with one example
(Towers of Hanoi).
C/O DATAPRO, Beside UCO Bank, Women’s College Road, Danavaipeth,
Rajahmundry. Ph: 0883-2474088, 9989241515
45.Explain categories of functions.
i) With return type & with parameters.
ii) With return type & without parameters.
iii) Without return type & with parameters.
iv) Without return type & without parameters.
46.What are header files and Preprocessors in ‘C’. (OR)
Explain about header files and preprocessor directives in C.
47.Write about pointers, and its advantages with example.
48.How can we pass the pointers to the following?
i) Pointers to pointers.
ii) Pointers to functions.
iii) Pointers to arrays.
49.Write short notes on:
i. What is a null pointer? When is it used?
ii. What is a ‘void’ pointer? When is ‘void’ pointer used?
50.What is dangling memory? What are the consequences and how it can be
avoided.
51.What is static and dynamic memory management? Explain with an
example. (OR)
Write about static memory and dynamic memory with dynamic memory
allocation functions.
52.What is the difference between malloc() and calloc().
53.What is Enum and explain it with example.
54.What is the structure and union type? Explain them with examples.
55.Explain the concept of nested structures. Explain them with examples.
56.Explain in detail about types of structures.
i. Ordinary structures.
ii. Array type structures.
iii. And explain advantages of array structures over ordinary
structures.
57.Write about typedef with an example.
58.Explain file handling in c. and explain various file opening modes in C
language. Explain about file handling functions in c.
59.Distinguish between text files and binary files.
60.Explain about various character input functions.

C/O DATAPRO, Beside UCO Bank, Women’s College Road, Danavaipeth,


Rajahmundry. Ph: 0883-2474088, 9989241515
Lab Assignments (Sequence)
1. Write a C program to print your name, date of birth, and mobile number.
Expected Output:
Name: Raj Jain
DOB: Feb 20, 2002
Mobile: +91-9949128444

2. Write a Program to Read Price of iPhone & Cover Case and calculate total Bill.

3. Write a program that reads the bill amount and the amount paid by the customer, and
then display the balance amount to be returned to the customer?
Expected Output:
Input:
Enter the Total Bill Amount: 1895
Enter the amount paid by the customer: 2000

Output:
Balance amount to be returned is: Rs. 105/-

4. Write a Program to read Marks of 5 Subjects English, Sanskrit, Math’s, Physics &
Chemistry, Calculate Total & Average.

5. Write a Program to Read Basics Salary of an Employee and Display Gross Salary and Net
Salary from the following information.
HRA is 20% of Basic Salary
DA is 10% of Basic Salary
PF is 5% of Basic Salary
Note:
Gross Salary = Basic Salary + HRA + DA
Net Salary = Gross Salary – PF

6. Write a Program to swap values of two Variables A and B without using 3 rd variable

7. Write a Program to Read Total Flying time from Hyderabad to Singapore in minutes and
display into hours and minutes.
Input:
Enter Flying time from Hyderabad to Singapore in minutes: 135
Output:
Flying time from Hyderabad to Singapore is 2 hrs and 15 minutes.

C/O DATAPRO, Beside UCO Bank, Women’s College Road, Danavaipeth,


Rajahmundry. Ph: 0883-2474088, 9989241515
8. Write a Program to read days from the user and convert it into years, months, weeks and
Days.
Note: Consider 365 days in a year and 30 days in a month.

Expected Output:
Input:
Enter No of Days:500
Output:
Years:1
Months:4
Weeks:2
Days:1

9. Write a Program to read 3 characters from the and display them in Reverse Order.
Expected Output:
Input: Enter 3 characters of your choice: A B C
Output: Reverse of ABC is CBA

10. Write a Program to Read Full name, Gender and Native Place of a Person and Display.
Input:
Enter ur Full Name: Raj Jain
Enter ur Gender(M/F): M
Enter ur Native Place: Rajasthan

Output:
Raj Jain - M - Rajasthan

11. Write a Program to Read Roll no, Name, Gender & Height of a person display how many
bytes of memory each variable occupies.
Note: height should be double type
Input:
Enter Roll no: 101
Enter Gender(M/F): M
Enter Name: Raj Jain
Enter Height: 5.7

Output:
Roll no Occupies 4 bytes of space
Gender Occupies 1 byte of space
Name occupies 20 bytes of space
Height occupies 8 bytes of space

C/O DATAPRO, Beside UCO Bank, Women’s College Road, Danavaipeth,


Rajahmundry. Ph: 0883-2474088, 9989241515
12. Write a Program to Read Capital Alphabets from the user and Display in Lower case.

Input:
Enter any Upper-case Alphabet from A to Z: D
Output:
Lower case form of D is d

13. Write a Program to read the temperature in Fahrenheit and Convert into Centigrade.

14. Write a Program to Read Rupees and Convert into Paise

15. Write a Program to Evaluate (a+b)2

16. Write a Program to Read Radius of a Circle and Calculate Area.


Note: PI value Should be declared as const variable

17. Mr. Rao is an Employee, write a C Program to Calculate Gross Salary and Net Salary from
the input Basic Salary, Allowances and Deductions.

18. Write a Program to Calculate Electricity from the Inputted Present Month and Last
Month Reading.
Note: Rate Per unit is: 7.85/-

19. Write a Program to Display the following in the Center of the Screen.
AH CAREER PVT LTD
Danavaipeth
Rajahmundry.

20. A Bus Travels from Point A to Point B Every day, write a Program to read Total Travelling
in Kilo Meters and Display into meters.

21. Group of Friends Went to a Restaurant, you must help those friends to Split the Total Bill
along with the TIP among them.
Note: TIP is %5 or 10% of Bill Amount.
Input:
Enter Total Bill Amount: 2500
Enter the TIP (5% or 10%): 10
Enter Total Number of Friends: 5
Output:
Each One Have to Pay Rs. 555.00 /-

C/O DATAPRO, Beside UCO Bank, Women’s College Road, Danavaipeth,


Rajahmundry. Ph: 0883-2474088, 9989241515
Lab Assignments (Selection)
1. Write a C program to read the age of a candidate and determine whether he/she is
eligible to cast his/her vote.

Test case 1:
Input:
Enter ur Age: 21
Expected Output:
Congratulations! "You are eligible" for casting your vote.

Test case 2:
Input:
Enter ur Age: 11
Expected Output:
Opps! You are "Too Young" to Vote.

2. Write a Program to read price of Samsung Mobile & Vivo Mobile and display which is
Costlier, if both the mobiles are at same price then display “Both are at Same Price."

3. WAP to calculate the discount and final amount based on given data: -
Note: If sales>= 25000 then 10% is allowed other wise 5% discount is allowed.

4. Write a program that prompts the user to enter the names and ages of two friends, and
displays which friend is older or if they are the same age."

5. Write a C program to check whether a given number is positive or negative.


Input:
Enter a no: 15
Expected Output:
15 is a positive number.

6. Write a Program to find Biggest of 4 numbers.

7. Write a C program to check if a given number is divisible by both 3 and 5.

8. Write a program to read the price of 3 pens Reynolds, Montex and Parker and display
which is the costliest one.

9. Create a program that takes three numbers as input and displays them in ascending
order. Use if and else statements to compare the numbers and arrange them accordingly.

C/O DATAPRO, Beside UCO Bank, Women’s College Road, Danavaipeth,


Rajahmundry. Ph: 0883-2474088, 9989241515
10. What is the C program that reads two numbers from the user and prints their absolute
difference?
Note:
The absolute difference is the positive value obtained by subtracting one number from
another without considering the sign

11. Write a C program to read cost price and selling from the user and calculate profit or
loss or no loss no profit.
Test Case 1:
Input:
Enter Cost Price: 100
Enter Selling Price: 150

Output:
Heyy, You have made a profit of Rs.50/-

Test Case 2:
Input:
Enter Cost Price: 200
Enter Selling Price: 180

Output:
Oops!, You Incurred a Loss of Rs.20/-

Test Case 3:
Input:
Enter Cost Price: 250
Enter Selling Price: 250

Output:
Hmmm!, No Loss…No Profit…

12. Write a program to read rating of 3 movies of ur choice and display which is the hit
movie(use logical operator && ). (Note: Rating is 1 to 10 )

C/O DATAPRO, Beside UCO Bank, Women’s College Road, Danavaipeth,


Rajahmundry. Ph: 0883-2474088, 9989241515
13. Write a C program to read temperature in centigrade and display a suitable message
according to the temperature state below:
• Temp < 0 then Freezing weather.
• Temp 0-10 then Very Cold weather
• Temp 10-20 then Cold weather
• Temp 20-30 then Normal weather
• Temp 30-40 then Its Hot
• Temp >=40 then Its Very Hot

Input:
Input Temperature in centigrade:
42
Expected Output:
Its very hot.

14. AHC Constructions Constructed a High Rise Building which has 50 floors, Families who
are residing at even Floors has beach view and Families who are residing at odd floors has
Forest View, write a C Program to read the Floor number and display which view the floor
has.
Note: Floor number should be <=50, otherwise displays a message “We have only 50 floors”

Test Case 1:
Input:
Enter ur Floor number: 12
Output:
Heyy you have "Beach View" for your Flat.

Test Case 2:
Input:
Enter ur Floor number: 21
Output:
Heyy you have "Forest View" for your Flat.

Test Case 3:
Input:
Enter ur Floor number: 81
Output:
We have only "50 floors"

15. Write a Program to read a character and check whether it is capital letter or lower-case
letter or Digit or Special character.

C/O DATAPRO, Beside UCO Bank, Women’s College Road, Danavaipeth,


Rajahmundry. Ph: 0883-2474088, 9989241515
16. Write a Program to read a character and check whether it is vowel or consonant.
Note: for any input other than alphabet display “Invalid Input”.

17. Write a Program to read your year of birth and check whether you were born on leap
year or not.

18. Write a program in C to calculate and print the electricity bill of a given customer. The
customer ID, name, and unit consumed by the user should be captured from the keyboard
to display the total amount to be paid to the customer.

The charges are as follows:


Unit Charge/unit
upto 199 @1.20
200 and above but less than 400 @1.50
400 and above but less than 600 @1.80
600 and above @2.00

✓ The minimum bill should be Rs. 100/-


✓ If the bill amount exceeds Rs. 400 then a surcharge of 15% will be charged.

Input:
Input Customer Id: 1001
Input Customer Name: James
Input Units Consumed: 800

Expected Output:
Customer IDNO: 1001
Customer Name: James
Unit Consumed: 800

Amount Charges @Rs. 2.00 per unit: 1600.00


Surcharge Amount: 240.00

Net Amount Paid by the Customer: 1840.00

C/O DATAPRO, Beside UCO Bank, Women’s College Road, Danavaipeth,


Rajahmundry. Ph: 0883-2474088, 9989241515
19. WAP to accept marks of 3 subjects and perform the following:
Calculate Total and Average and display the Grade based on below data.
Average Grade
Above 90% A+
80 – 90 A
70 – 80 B+
60 – 70 B
50 – 60 C
Below 50 F

20. WAP to print the discount and the actual amount from the given details.
Sales Discount
>=25000 25%
20000 – 25000 20%
10000 – 20000 10%
5000 – 10000 5%
Below 5000 no discount

21. WAP to accept basic salary, allowances, deductions, and experience of an


Employee and perform the following -
A. Calculate gross and net salary.
B. Calculate bonus from experience.
i. If experience is > 5 years then 3 months net salary is given as bonus
ii. If experience is >3 years then 2 months net salary is given as bonus
iii. Otherwise, 1 month of net salary is given as bonus.

22. WAP to check whether the inputted data is capital letter or small letter or
digit or special character.

23. WAP to check whether the input character is a vowel or a consonant.


Use: toupper() or tolower() function

24. WAP to check whether the person is eligible for bonus or not based upon the
data given below. Bonus is given only to the following persons.
i. Persons who are married.
ii. Unmarried Male above 30 years.
iii. Unmarried Female above 25 years.

25. Solve the above program using logical operators

26. South central railway gives 50% concession to its passengers those who fulfill
the following eligibility criteria.
i. Male above 60 years of age
ii. Female above 50 years of age
iii. Full concession for under 5 years (no ticket is required).
WAP to check if a passenger is eligible for concession based on the above data.

C/O DATAPRO, Beside UCO Bank, Women’s College Road, Danavaipeth,


Rajahmundry. Ph: 0883-2474088, 9989241515
27. ABC ltd company sells Smart TV’s to their customers on cash and credit basis. If the
customer pays cash, then 25% discount is allowed. If a customer buys on
credit and paid within 7 days, then 15% of discount is allowed else 10% extra
is charged.
WAP to generate the final bill of a customer.

28. WAP to accept marks of c, cpp, java and calculate total, average, class only if
the student passes in all the 3 subjects otherwise display the subject in which
he is failed and message as “no grade”.

29. WAP to prepare electricity bill from the following data


Units consumed Domestic Commercial
<100 Rs. 100 Rs.150
100 – 200 Rs. 1.50 PU Rs.2.50 PU
200 – 300 Rs. 3.00 PU Rs.4.50 PU
>=300 Rs. 5.00 PU Rs.7.50 PU

30. Write a program to check whether inputed no is even or odd using ternary
operator. (use only % operator).

31. Write a C program to accept the height of a person in centimeter and categorize
the person based on height as taller (above 5.5), dwarf(low height)(below 4.5) and
average height person based in feet.
(Note: 1 feet = 30.48 cm)

32. Design an application for Restaurant.

Veg KHANA Restaurant


~~~~~~~~~~~~~~~~~~~
Sno Items Price
---- --------- --------
1. Iddli Rs.25
2. Dosa Rs.50
3. Vada Rs.20
4. Upma Rs.25
5. Exit
Which item to order..:
How many plates ….:

Total bill is: XXXXX

C/O DATAPRO, Beside UCO Bank, Women’s College Road, Danavaipeth,


Rajahmundry. Ph: 0883-2474088, 9989241515
33. Write a program to arithmetic operations (use: switch case)

Enter a no..: 10
Enter another no..: 20

Enter ur option(+,-,*,/,E)..: +

Output : 10 + 20 = 30

34. Write a C Program to accept a grade and declare the equivalent description if code
is S, then print SUPER, if code is A, then print VERY GOOD, if code is B, then print
FAIR, if code is Y, then print ABSENT, if code is F, then print FAILS. (use switch case)

35. Write a C program to find out whether the character presses through the
keyboard is a digit or not (using conditional operator).

36. Write a program which reads two integer values. If the first is lesser print the
message "up". If the second is lesser, print the message "down" if they are equal,
print the message "equal".

37. Write a C program that prints the given three integers in ascending/descending
order using if – else.

38. Given as input three integers representing a date as day, month, year, print the
number day, month, and year for the next day's date.
Typical input: “28 2 1992”
Typical output: “Date following 28:02:1992 is 29:02:1992”.

39. Write a program to display the traffic control signal lights based on the
following. (switch-case)
✓ If user entered character is R or r then print “RED Light Please STOP”.
✓ If user entered character is Y or y then print “YELLOW Light Please Check and
Go”.
✓ If user entered character is G or g then print “GREEN Light Please GO.”
✓ If user entered some other character, then print “THERE IS NO SIGNAL POINT.”

40. Write a program in C to accept a grade and declare the equivalent description:
(Using switch-case)
Grade Description
E Excellent
V Very Good
G Good
A Average
F Fail

C/O DATAPRO, Beside UCO Bank, Women’s College Road, Danavaipeth,


Rajahmundry. Ph: 0883-2474088, 9989241515
Lab Assignments (Loops/Iterations)
1. Write a Program to Print Natural Numbers from N to 1.
2. Write a Program to Read a Name and Display Length Many times along
with serial no.
3. Write a Program to Read 10 Numbers and Display sum of even numbers
and odd numbers along with count.
4. Write a Program to Alphabets from A to Z (Uppercase Letters).
5. Write a Program to Print Sum of First & Last Digits of an Inputted Number.
▪ Ex: 2483
6. Write a Program to Program to print result for the input based and power.
7. Write a Program to Read name and Aadhar No of the Person and Display
the following messages for the valid and invalid Aadhar nos.

Sample input 1:
Enter ur name: Raj Jain
Enter ur 12 Digit Aadhar No: 1234123412341234

Output:
Heyy Raj Your Aadhar No 1234123412341234 is Verified successfully.

Sample input 2:
Enter ur name: Ramesh Kumar
Enter ur 12 Digit Aadhar No: 123412341234123

Output:
Heyy Ramesh Kumar Your Aadhar No 123412341234123 is invalid, kindly
recheck.
8. Write a Program to check whether the inputted number is Perfect number
of not.

9. Write a Program to check Whether the inputted number is Strong number


or not.
10.Write a Program to Read no and print that no that many times.
▪ Ex: If the user Inputs 25, then print the no 25 times.
11.Write a Program to read a table no, starting value, ending value and print
table from starting value to ending value.

C/O DATAPRO, Beside UCO Bank, Women’s College Road, Danavaipeth,


Rajahmundry. Ph: 0883-2474088, 9989241515
12.Write a Program to check whether the input number is prime or not along
with no of iterations.

13.Write a Program to print Fibonacci Series from till 100.


Ex: 1 1 2 3 5 8 13…100

14. Write Program to print prime numbers between two given Positive
numbers.
▪ If the first number is greater than the second number, then display a
message “Invalid Range” and stop the Program.

15.Write a Program to Print all the Arm Strong Numbers between 100 and
1000.

16.Write a Program to read a Vehicle number and check whether it is


palindrome number or not.

17.Write a Program to read date of birth in "MMDDYYYY" format, find Lucky


Number and Display Suitable Gemstone for that person.
Ex: MMDDYYYY format – 14051996

18.Write a Program to keep on reading numbers from the user till the user
inputs 0, and count numbers of even numbers and odd numbers along with
sum.

19.Write a Program to read a Positive Numbers and print its factorial.

20.Write a Program to Generate 10 Random Numbers and Display the Biggest


one.
21.Program to Find HCF of two numbers.
22.Program to Find LCM of two numbers.
23.Write a Program to Print ASCII Chart.
24.Write a Program to Print Factors of a Positive Number.
25.Write a Program to read name of a person and display its length, this
process should be continued till the user says N.

C/O DATAPRO, Beside UCO Bank, Women’s College Road, Danavaipeth,


Rajahmundry. Ph: 0883-2474088, 9989241515
Lab Assignments (Arrays)

1. Write a Program to Read Array of N Elements and Print Total & Average.
2. Write a Program to fill the Array of 10 Elements with Even Numbers at odd
index and Odd Numbers at even Index.
▪ First Even Number is 2 and First Odd Number is 1
3. Write a Program to Fill the Array of 10 Numbers with Random Numbers,
Print Even Numbers, Odd Number and Prime Numbers Separately.
▪ Random Numbers Must Not Exceed 999/-
4. Write a Program to Fill the Arrays of 10 Elements with Random Numbers
and sort them in Ascending Order and Descending order and print
Separately.
5. Write a Program to fill the Array of N Elements of Multiples of 5 and copy
to another array and print.
6. Write a Program to Build Tambola (Housie) App.
▪ To build this application you must fill an array with 90 unique
numbers.
7. Write a Program Find Minimum and Maximum Number from the Array of
10 Inputted Numbers.
8. Write a Program to Find Frequency of Each element from the Array of N
Elements.
9. Write a Program to Fill Array of 10 Random Numbers and Count Number of
digits of Each Element of the Array.
10.Write a Program to Insert an Element in the Array of N Elements
11.Write a Program to Delete a from the Array of N Elements
12.Write a Program to Perform Matrix Multiplication of Two Arrays of 3*3 Size.
13.Write a Program to Print Diagonal Elements of a Square Matrix (5*5).
14.Write a Program to Print Upper Triangle and Lower Triangle of 5*5 Array.
15.Write a Program to Search for an Element in 5*5 Matrix.

C/O DATAPRO, Beside UCO Bank, Women’s College Road, Danavaipeth,


Rajahmundry. Ph: 0883-2474088, 9989241515
Lab Assignments (strings)
1. Write a Program to Read a name and print Length Many Number of Times
along with serial number.
2. Write a Program to Convert the Inputted String into Proper Case.
3. Write a Program to Check Whether the Inputted String is Palindrome or
Not.
4. Write a Program to Read username and Password.
Note: Password input should display stars ****
5. Write a Program to Read a password and Check its Strength.
Note: Password should be minimum 8 characters long.
Password Strength is calculated based upon the following parameters:
a. If the password contains all ie small case letters, capital letters, digits
and symbols then password is : very Strong
b. If the password contains small case letters & capital letters and any of
the digits or symbols then password strength is : Strong
c. If the password contains Small case letters and any of the Capital letters,
or Digits or Special Characters, the password strength is: Medium
d. If all characters are in lower case and no Capital letter or Digit or Symbol,
then password strength is : Weak
6. Write a Program to Read two Passwords, compare their Lengths, if Lengths
are equal then Check for Similarities.
7. Write a program in C to find the largest and smallest words in a string.
Input:
Enter a String: Python is Very Powerful and Easy Programming Language
Output:
Smallest Word is: is
Largest Word is: Programming
8. Write a Program to Reverse the Inputted String.
9. Write a Program to Print the Second word from the Inputted String
10.Write a Program to Generate username from the inputted mail id:
Ex: if the mail id is [email protected] then username is: atish_jain
11.Write a Program to read ur name and copy all the vowels in one string and
all the consonants in another string.
12.Program to check whether the given word exists in the main string or not.

C/O DATAPRO, Beside UCO Bank, Women’s College Road, Danavaipeth,


Rajahmundry. Ph: 0883-2474088, 9989241515
13.Write a Program to read your name and print the following pattern.
Enter ur name:Atish
A
A t
A t i
A t i s
A t i s h
14. Write a Program to Read 10 Names and Display the Longest Name along
with its Length and Position.
15.Program to Read a Name and Display "Success Message"
Note: Name should not be blank and Name Must be minimum 5 characters
in length.
16.Write a Program to Read email id and Validate it.
a. Mail id should have @ and .
b.@ should come after at least 3 characters (ex: abc@)
c. . should come after@ and should be At least after 3 characters
(ex:[email protected])
17. Write a Program to Read a String and count the first character of the string
in the inputted string.
18.Program to read a string and copy the string Vowels in Uppercase and
Consonants in lowercase.
Input: Atish Jain Output: AtIsh jAIn
19.Write a Program to read two strings and check if they are Anagram Strings
are not.
Note: Two strings are said to be anagrams if they satisfy two conditions,
the length of both strings must be equal to each other and second the
strings must have the same set of characters.
Input:
First String = “study”
Second String = “dusty”
Output:
“study” and “dusty” are anagrams.
20. Declare a string and assign “Happy Programming” and display it zigzag case
Zig Zag Case: HaPpY PrOgRaMmInG

C/O DATAPRO, Beside UCO Bank, Women’s College Road, Danavaipeth,


Rajahmundry. Ph: 0883-2474088, 9989241515
Lab Assignments (Functions, Pointers, Directives & Storage classes)

1. Create a Header with the name “myfunctions.h” and create 4 functions in it.
1. Function to calculate mean of 3 nos
2. Function to check Positivity or Negativity of a number.
3. Function to find word count of a string
4. Function to convert the string into proper case

2. Program to swap the values of two variables using functions.

3. Program to calculate area of Circle.


Note: PI value must be defined using #define

4. Title: Website Visitors Tracker


Create a C program with a countVisitors() function that uses the static storage
class to keep track of the total number of website visitors. Demonstrate its
functionality by calling the function ten times in the main and displaying the
visitor count after all the function calls.

5. Program to read a string and display it character by character along with


memory address.

C/O DATAPRO, Beside UCO Bank, Women’s College Road, Danavaipeth,


Rajahmundry. Ph: 0883-2474088, 9989241515
Lab Assignments (Structures, Unions & Files)
1. Develop a program that maintains a catalog of books. Each book should
have details like bookid, title, author, noofpages, price and nd
publication_year.
Implement functions to add new books, display all books in the catalog,
search for books by a particular bookid or author or title, and update
book details (e.g., change the price).

2. Design a program to manage an employee payroll system. Each


employee's details should include their name, employee ID,
designation, and salary.
Create functions to add new employees, display all employees,
calculate and display the average salary of all the employees, and find
employees with the highest and lowest salary.
Note: Implement this assignment using functions and pointers.

3. Write a Program to read Student name and any of the Identity Proof
from the following.
a. Aadhar no
b. Passport No
c. PAN No
d. Driving License No

Create a Functions to read the student name and id proof, display all the
student names with id proofs and search function to display Student
name using aadhar no.

4. C Program to Replicate ren command of Windows Command Line


Interface (MS-DOS).
5. Write C Program to read Employee id, name and salary and store into
employee.dat file.
Note: Employee Name Must be Unique.

C/O DATAPRO, Beside UCO Bank, Women’s College Road, Danavaipeth,


Rajahmundry. Ph: 0883-2474088, 9989241515

You might also like