MCA Programming Lab Assignment Questions PDF
Document Details
![EvaluativeWilliamsite2214](https://quizgecko.com/images/avatars/avatar-18.webp)
Uploaded by EvaluativeWilliamsite2214
JGI University
Tags
Summary
This document contains a set of assignment questions for a Programming Language Lab course in a MCA program. The questions cover a variety of programming concepts, including loops, functions, arrays, and file operations.
Full Transcript
C:\\Users\\1058\\Downloads\\aju naac logo dark (2).png Assignment Questions MCA Semester: 1 Subject: Basics of Programming Language Lab Faculty-in-Charge: Mr. Akash Kumar Bhagat 1. Write a program that displays your name, roll number, and course information and display them in a formatted...
C:\\Users\\1058\\Downloads\\aju naac logo dark (2).png Assignment Questions MCA Semester: 1 Subject: Basics of Programming Language Lab Faculty-in-Charge: Mr. Akash Kumar Bhagat 1. Write a program that displays your name, roll number, and course information and display them in a formatted output. 2. Write a program to input two numbers and display their sum, difference, product, and quotient. 3. Write a program that converts a given temperature from Celsius to Fahrenheit. 4. Write a program that calculates the area and perimeter of a rectangle, given its length and width. 5. Write a program to check whether a given year is a leap year or not. 6. Write a program to calculate the grade of a student based on marks entered by the user 7. Write a program to find the factorial of a number using a while loop. 8. Write a program to calculate the factorial of a number using a for loop. 9. Write a program to generate the Fibonacci series up to n terms using a while loop. 10. Write a program that uses a do-while loop to print the reverse of a number. 11. Write a program to print all prime numbers between 1 and 100 using a do-while loop. 12. Write a program to find the largest of three numbers using if-else statements. 13. Write a program that uses a switch-case to display the day of the week when a number between 1 and 7 is entered. 14. Write a program to find the factorial of a number using a function. 15. Write a program to find the greatest of three numbers using a function. 16. Write a program that uses recursion to calculate the factorial of a number. 17. Write a function to calculate the power of a number (x raised to the power of y). 18. Write a program to input n numbers and display the largest and smallest number in the array. 19. Write a program to reverse an array of integers. 20. Write a program to accept 10 integers in an array and print the sum of the elements in the array. 21. Write a program to perform matrix multiplication for two 2x2 matrices. 22. Write a program to swap two numbers using pointers. 23. Write a program to find the length of a string using pointers. 24. Write a program to demonstrate the use of pointers in array manipulation. 25. Write a program to count the number of vowels and consonants in a string. 26. Write a program to check whether a string is a palindrome or not. 27. Write a program to concatenate two strings without using the built-in strcat() function. 28. Write a program to store and display the details of a student (name, roll number, marks) using a structure. 29. Write a program that uses a union to store data of different types (integer, float, character), and display the stored value 30. Write a program to create a file and store information like name, age, and marks of students. Then, display the contents of the file. 31. Write a program to read and display the contents of a text file. 32. Write a program to copy the contents of one file to another. 33. Write a program to dynamically allocate memory for an array and input n integers, then display them. 34. Write a program that uses malloc() to allocate memory for a string and then stores and displays the string. 35. Write a program to implement a simple calculator that can perform addition, subtraction, multiplication, and division. 36. Write a program to create a menu-driven calculator that performs different operations on two numbers, where the user selects the operation.