0% found this document useful (0 votes)
4 views2 pages

Computer Programming Lab Questions

The document outlines a series of programming tasks and exercises for a Computer Programming Lab Tutorial. It includes writing programs in C and C++ for various operations such as displaying messages, mathematical calculations, data structures, and object-oriented programming concepts. Each task requires the creation of algorithms, flowcharts, and code implementations to reinforce programming skills.

Uploaded by

Bikal Gaming
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)
4 views2 pages

Computer Programming Lab Questions

The document outlines a series of programming tasks and exercises for a Computer Programming Lab Tutorial. It includes writing programs in C and C++ for various operations such as displaying messages, mathematical calculations, data structures, and object-oriented programming concepts. Each task requires the creation of algorithms, flowcharts, and code implementations to reinforce programming skills.

Uploaded by

Bikal Gaming
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

Computer-Programming Lab Tutorial

1. Write a program to display “Welcome to C programming Class”.

2. Write an algorithm, flow chat and program to add two numbers.

3. Write an algorithm, flow chat and program to take the temperature in Fahrenheit and convert it
in to Celsius.

4. Write an algorithm, flow chat and program to calculate the area of triangle whose sides are
taken from user.

5. Write an algorithm, flow chat and program to calculate the roots of the quadratic equation.

6. WAP to generate Floyd’s triangle as follows:

2 3

4 5 6

7 8 9 10

7. WAP to read 3 digits number and test whether it is Armstrong number or not.

8. WAP to display Fibonacci series (N terms)

9. WAP to make a menu for addition, subtraction and multiplication of two numbers.

10. WAP to read string from user and Check Whether it is palindrome or not.

11. WAP to calculate the sum of the diagonal elements (Trace) of matrix supplied by user.

12. WAP to read string from user and check whether it is palindrome or not.

13. WAP to illustrate the function with arguments and no return value

14. WAP to illustrate the function with no arguments and return value

15. WAP to swap the values of two variables using call by value.

16. WAP to swap the values of two variables using call by reference.

17. WAP to calculate the factorial of a supplied number using recursive function.

18. WAP using pointer to read 10 integers in an array and display its element in reverse order

19. WAP to create a structure student containing Name, Roll No, Marks as members and that
structure to read and display the data entered by the user.

20. WAP to create a Union student containing Name, Roll No, Marks as members and that Union to
read and display the data entered by the user.
21. WAP to declare a class student having some properties name, roll no and marks by using two
member functions getdata (that takes detail information of student) and displaydata (that
display the information of student).

22. Write a C++ program to demonstrate the use of constructor and destructor.

23. Write a C++ program to demonstrate a friend function that can access private data of a class.

24. Write a C++ program to demonstrate an inline function.

25. Write a C++ program to demonstrate function overloading.

26. Write a C++ program to demonstrate single inheritance.

27. Write a C++ program to demonstrate function template.

28. Write a C++ program to demonstrate exception handling using try, catch, and throw.

You might also like