PST Important Questions for BCA 1st Sem

100% found this document useful (1 vote)
2K views4 pages
Pst important questions 1 semester

Uploaded by

Javeed Salman
  • UNIT-1
  • UNIT-2
  • UNIT-3
  • UNIT-4

PST IMPORTANT QUESTIONS

UNIT-1
2MARKS:
1. Define algorithm.
2. What is structured programming?
3. What is an algorithm? Write its features.
4. What is software? Mention the classification of software.
5. Explain the characteristics of Algorithms?
6. Explain Priori Analysis and Posteriori Analysis?
7. What is Complexity of an algorithm? What are its types?
8. Explain Space Complexity of an Algorithm with an example?
9. Explain Time Complexity of an Algorithm with an example?
10. What is Time-Space Tradeoff?
11. Explain the Asymptotic Notations? List any two?
12. Mention two methods for analysing the performance of an algorithm?
13. What is an efficiency of algorithm?
14. Give few good qualities of an algorithm?
15. What is the growth of functions?
8MARKS AND 14 MARKS
1. Define a Flowchart and Explain All Flowchart Symbols?
2. Explain Analysis or Performance Analysis of Algorithm?
Algorithm compulsory questions:
1. Write an algorithm to find the average of three numbers?
[Link] an algorithm to calculate the simple interest?
[Link] an algorithm to find the area of the triangle?
[Link] an algorithm to find the greatest among three numbers?
[Link] an algorithm to calculate the perimeter and area of rectangle?
6. Write an algorithm to find the Square of an numbers?

Name: Mr. Santhosh Kumar S


Designation: Assistant Professor
Department: Computer Application
College: AMC
PST IMPORTANT QUESTIONS

UNIT-2
2MARKS:
1. Explain ternary operator.
2. Define the different types of type conversion with examples.
3. What is a function prototype?
4. Define an array and explain how an array can be initialized.
5. Define a pointer with an example
6. Write the features of C?
7. What is the difference between break and continue statements?
8. Distinguish between actual arguments and formal arguments of a function.
9. What is recursion?
10. Mention any four C tokens?
11. What are the rules for declaring a variable in C?
12. What are local and global variables?
13. Define Pointer with an example
14. Distinguish between calloc() and malloc()
15. What is a storage class?
16. Write a note on command line arguments
17. Explain Identifiers in C with examples?
18. Mention the Special Symbols used in C language?
19. Explain Format Specifiers in C language?
20. Define Pre-processor Directives?
21. What is enumerated datatypes?
8MARKS AND 14 MARKS
1. Define the different types of type conversion with examples.
2. Explain the structures of a ‘C’ program with an example.
3. Explain the Union of a ‘C’ program with an example.
4. Write any four mathematical functions available in ‘C’.
5. Explain call by value and call by reference with an example?
6. Explain the different data types supported by ‘C’.
Name: Mr. Santhosh Kumar S
Designation: Assistant Professor
Department: Computer Application
College: AMC
PST IMPORTANT QUESTIONS

7. Explain operators with an example


8. Explain the different looping statements with an example
9. Explain the different Conditional statements with an example
10. Explain string operations with an example.
11. Explain the switch statement in ‘C’ with an example
12. Explain the structure of a C program with an example
13. Explain goto Statement with an example and Labels with an example?
14. What is Constructor and its types?

UNIT-3
2MARKS:
1. Explain rand( ) function with an example?
[Link] srand( ) function with an example?
8MARKS AND 14 MARKS
Compulsory 2 question
1. Write a C program to find the factors of any given number?
[Link] a C program to find a square root of the given number?
[Link] a C program to find the smallest divisor of a given integer number?
[Link] a C program to find the GCD of two numbers?
[Link] a C program to find the Prime Factors of an Integer?
[Link] Generation of Pseudo-Random Numbers in C?
7. Write a C program to Raise a number to a larger Power?
Compulsory 2 question
1. Explain Array Order Reversal with example?
[Link] the Algorithm to Remove Duplicates from an ordered Array with an example?
[Link] the Algorithm for Partitioning an Array with an example?
[Link] the Algorithm for finding the Kth smallest element in a set with an example?
[Link] a C program to perform multiplication of two matrices?
Name: Mr. Santhosh Kumar S
Designation: Assistant Professor
Department: Computer Application
College: AMC
PST IMPORTANT QUESTIONS

[Link] the Algorithm to perform multiplication of two matrices with an example?


[Link] the Algorithm for Array Counting or Histogramming with an example?
[Link] the Algorithm to find the Maximum Number in a set with an example?

UNIT-4
2MARKS:
1. What is Merging?
[Link] is Text line length adjustment?
[Link] is Hash search? Explain with example?

8MARKS AND 14 MARKS:


[Link] Two-way Merge with example and prog
[Link] is Text Processing and Pattern Matching?
[Link] is Sorting? Mention the types of Sorting Techniques?
[Link] Selection Sort with example and program?
[Link] Bubble Sort with example and program?
[Link] Insertion Sort with example and program?
[Link] Shell Sort with example and program?
[Link] Quick Sort with example and program?
[Link] Linear search with an example?
10. Explain Binary search with an example?
[Link] the difference between linear and binary search?

Name: Mr. Santhosh Kumar S


Designation: Assistant Professor
Department: Computer Application
College: AMC

Common questions

Powered by AI

Text line length adjustment is crucial in text processing and layout customization, influencing both the aesthetics and readability of printed or displayed text. It manages margin increases, unequal spacing, and hyphenation to create visually appealing and easy-to-read text formats. Applications include word processors and publishing software, where precise control over text alignment and justification improves the end-user experience, ensuring text blocks adhere to design specifications without sacrificing readability .

Asymptotic notations like Big O, Omega, and Theta notations are crucial for analyzing and describing an algorithm's performance in terms of input size, as they abstract away constant factors and lower-order terms to focus on the growth rate. For example, Big O notation estimates the worst-case scenario growth, while Theta notation gives a tight bound by considering both lower and upper limits. These notations help compare algorithms and determine their efficiency and scalability in different contexts .

The switch statement in C simplifies code readability and maintenance by handling multiple conditional branches efficiently, which is especially useful when a single variable is tested against numerous constant values. Unlike a series of if-else statements, which evaluates each condition sequentially, switch can directly jump to the matching case due to its use of a branching table, enhancing efficiency. This structured control flow is beneficial in scenarios like menu-driven programs where multiple options based on discrete input values need to be processed .

An efficient algorithm is typically defined by characteristics such as correctness, which ensures the algorithm solves the problem accurately; clarity, where the steps are well-defined and understandable; and optimal time and space complexity, ensuring minimal usage of computational resources. These characteristics are important because they directly affect the algorithm's performance and scalability across different inputs and hardware environments .

calloc() and malloc() both allocate memory dynamically in C, but they differ in initialization and usage context. malloc() allocates the requested memory size but leaves it uninitialized, which might require explicit initialization later. calloc(), however, allocates memory and automatically initializes it to zero. calloc() is preferred when zero-initialization is necessary, such as in cases where newly allocated arrays must be zeroed out before use. Choosing between them depends on the application's need for initialization efficiency versus flexibility .

Algorithm complexity analysis is pivotal in developing efficient software solutions as it provides insights into the scalability and resource demands of an algorithm. Evaluating time and space complexity helps identify the best algorithmic strategy for a given problem, ensuring that the solution not only meets functional requirements but also performs effectively across different environments. This analysis is crucial in optimizing applications, balancing between acceptable execution time and memory usage, thus enabling the development of responsive and scalable software capable of handling large inputs or running on resource-constrained devices .

In 'call by value', functions receive copies of the arguments' values, so changes within the function don't affect the original values. For example, changing a parameter in a swap function will not alter the original variables passed. In contrast, 'call by reference' allows functions to modify the values of arguments by passing their addresses. This is beneficial in C when changes need to persist outside of the function scope, such as in sorting operations where the rearrangement needs to reflect in the original data set .

Sorting algorithms play a fundamental role in computer science, organizing data into a specified order, which facilitates efficient data retrieval, analysis, and processing. Different algorithms like Quick Sort, Merge Sort, Bubble Sort, and Insertion Sort offer varied trade-offs between time complexity, space complexity, stability, and implementation simplicity. For instance, Quick Sort is known for its average-case efficiency but lacks stability, whereas Merge Sort is stable but requires additional space. The choice of sorting algorithm depends on the specific requirements such as dataset size and memory constraints, with considerations on avoiding worse-case scenarios and balancing resources .

Recursion simplifies code by allowing problems to be broken into subproblems of the same type, which can lead to elegant solutions like the calculation of factorial numbers or the Fibonacci sequence. However, it increases complexity due to potential excessive memory use and risk of stack overflow errors if the recursion is deep or infinite. For example, recursive algorithms can solve problems like divide-and-conquer efficiently, yet they often require careful design to manage resources and optimize performance, such as using tail recursion or iterative approaches where feasible .

The time-space tradeoff in algorithm design signifies the balance between memory usage (space complexity) and execution speed (time complexity). For instance, using a hash table can significantly speed up data retrieval operations at the cost of increased memory usage. Alternatively, an algorithm might save on space by recalculating values rather than storing them, leading to higher time complexity. This tradeoff is crucial in environments with limited resources, guiding decisions on what extent of time or space is more valuable for a given application .

PST IMPORTANT QUESTIONS 
 
 
                                                                                  Name: Mr. Sant
PST IMPORTANT QUESTIONS 
 
 
                                                                                  Name: Mr. Sant
PST IMPORTANT QUESTIONS 
 
 
                                                                                  Name: Mr. Sant
PST IMPORTANT QUESTIONS 
 
 
                                                                                  Name: Mr. Sant

You might also like