0% found this document useful (0 votes)
22 views3 pages

Problem Solving and Computer Programming Syllabus

The document outlines a comprehensive course content covering theory and practical lab exercises in programming, including algorithms, data types, functions, structures, and file handling. It also emphasizes contemporary research trends and applications in the field. The lab section consists of various programming tasks aimed at reinforcing the theoretical concepts learned.
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)
22 views3 pages

Problem Solving and Computer Programming Syllabus

The document outlines a comprehensive course content covering theory and practical lab exercises in programming, including algorithms, data types, functions, structures, and file handling. It also emphasizes contemporary research trends and applications in the field. The lab section consists of various programming tasks aimed at reinforcing the theoretical concepts learned.
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

Course Content (Theory)

Unit-1: Introduction
Algorithms, Flow charts,Pseudo code Problem solving techniques ,Identifiers – Keywords–
Data Types – Data Type Conversions , Operators – Conditional Controls – Loop Controls–
Input/Output operations,
Unit-2: Problem solving
strategies

Algorithmic approaches: Sequential , Selection ( if, elif, if.. else, nested if else) ,Iteration
(while and for) , problem solving strategies: brainstorming, divide and conquer, reduction,
trial and error, heuristic, exhaustic search, backtracking, greedy
Unit-3 : Arrays
Arrays – Accessing Array Elements Pointers and Arrays – Arrays as Function Arguments, –
Function Returning Addresses – Dynamic Memory Allocation – Storage Classes.
Unit-4: Functions
Function Prototyping – Function Arguments – Actual vs. Formal Parameters – Pointers –
Pointer . Variables – Pointers Concepts in Functions – Multiple Indirection

Unit-5: Structure, Union and File Handling


Structures – Unions – typedef – enum – Array of Structures – Pointers to Structures – Macros
and Pre-processor, Character I/O – String I/O – Formatting input/output – File I/O

Unit-6: Contemporary research concept


The advances and the latest trends in the course as well as the latest applications of the areas
covered in the course. The latest research conducted in the areas covered in the course.
Discussion of some latest papers published in IEEE transactions and ACM transactions, Web
of Science and SCOPUS indexed journals as well as high impact factor conferences as well
as symposiums. Discussion on some of the latest products available in the market based on
the areas covered in the course and patents filed in the areas covered in the course

Course Content Lab


1. Write a program to convert temperature from degree centigrade to
Fahrenheit. °F = °C*9/5+32

2. Write a program to compute the addition, subtraction, product, quotient and


remainder of two given numbers.

3. Write a program to swap the values of two variables.

4. Write a program to compute net amount from the given quantity purchased and
rate per quantity. Discount of 10 .is allowed if quantity purchased exceeds 100.

5. Write a program to print the sum of digit of a given number.


6. Write program to print the Fibonacci series up to a given number.

7. Write a program to print the prime numbers within a given number.

8. Write a program to check a given number is prime or not.

9. Write a program to check whether a no is an Armstrong number.

10. Write a program to determine and print the sum of the following harmonic series for
a given value of n =1 +1/2+1/3+1/4+……+1/n

11. Write a program to print the Floyds triangle

2. 3

456
12. Write a program to read three integer values from the keyboard and display the output
stating that they are the sides of right angled triangle.

13. Write a program to accept an year from the user and check whether the entered year
is a leap year or not.

14. Write a program to print binary equivalent of an integer number.

15. Write a program to print the following pattern (take number of lines as input from the
user).

***

**

*
16. Write a program to _nd out the length of a given string without using the library
function strlen().

17. Write a program to print the reverse of a given string.


18. Write a program to check if a given string is palindrome or not. A string is
said to be palindrome if the reverse of the string is equal to the string.

19. Write a program to count the number of vowels in a given string.

20. Write a program for addition of two nxm matrices.

21. Write a program for multiplication of two nxm matrics

22. Write a program to compute factorial of a given number using function.

23. Write a function for swapping of two numbers.

24. Write a program for finding factorial of a number using recursion.

25. Write a program to sort an array using Bubble Sort (using function).

26. Write a program to search a key number in an array using Sequential Search
Method.(use function)

27. Write a program to accept student details (name,Enroll No, address, phone no,
Email)and store them in a file and perform the following operations on it.

a. Search b. Add c. Delete d. Modify e. Display.

Common questions

Powered by AI

Enumerated data types (enum) in C enhance code readability and reduce errors by allowing programmers to define variables that represent a set of named integer constants . This abstraction enables programmers to use meaningful names instead of numbers, improving code clarity. For instance, using an enum for days of the week can prevent common errors like using incorrect integer values. Compared to other data types, enums offer a clearer and more intuitive representation of categorical data, albeit with less flexibility than integers for arithmetic operations. The use of enums promotes better documentation and understanding of program logic, thus reducing coding errors .

Dynamic memory allocation in C allows programs to utilize memory efficiently by allocating and freeing up memory during runtime as needed. This flexibility is vital for developing applications where the amount of required memory may not be known at compile time, such as handling dynamic data structures like linked lists, trees, and graphs . For example, functions such as malloc(), calloc(), realloc(), and free() provide control over memory usage, allowing for scalable software solutions that can adapt to varying data input sizes. Proper usage of these functions can prevent memory wastage and leaks, contributing to robust and efficient software development .

Implementing file handling operations in C, especially character and string I/O, can present challenges such as managing file opening and closing, ensuring data integrity, and handling errors properly. Common issues include accidental overwriting of files, buffer overflows while reading strings, and failure to handle file pointers correctly . Solutions include using function returns to verify successful file operations (e.g., checking fopen/fclose return values), implementing robust error-checking mechanisms, and using buffering mechanisms like fgets and fputs for string operations to handle buffer overflows effectively . Ensuring the proper use of file modes and pointers is crucial to maintaining data integrity and program reliability.

Differentiating between actual and formal parameters is crucial in ensuring that functions receive and utilize input properly. Actual parameters are the values passed to a function, while formal parameters are the variables defined in the function signature that receive these values . This distinction is particularly important in C programming where pointers are used since the manipulation of actual parameter values can be done by referencing their memory addresses, allowing direct modification through pointer manipulation in functions . Properly understanding this relation enhances the efficiency and effectiveness of function calls, especially in dynamic and complex programming tasks.

Contemporary trends in algorithms, such as the development of quantum algorithms, machine learning integration, and the focus on parallel processing capabilities, are significantly influencing modern research . Quantum algorithms promise exponential speed-ups for certain problems, reshaping complexity theory. Machine learning influences algorithm design by incorporating adaptive heuristics and data-driven models . The emphasis on parallel processing optimizes algorithms for hardware advancements, leveraging multi-core processors and GPU computing. These trends indicate a shift towards more intelligent, scalable, and efficient computing solutions, impacting future programming practices by driving the adoption of new paradigms and expanding the capabilities of conventional algorithms .

Storage classes in C, such as auto, register, static, and extern, influence the scope, lifetime, and linkage of variables. The 'auto' and 'register' classes typically have automatic storage duration, meaning their lifetime is limited to the block in which they are defined. 'Static' variables have a persistent lifetime throughout the program execution, maintaining their value between function calls, and 'extern' is used for global variable linkage across multiple files . These properties are important for program optimization as they determine variable accessibility, memory management, and application efficiency, ensuring optimal use of resources and enhancing performance through proper variable scoping and availability control .

Converting a pseudo code into a functional programming algorithm involves several steps: understanding the problem, defining the pseudo code to outline the logic in plain language, developing a flowchart to visualize the program flow, and iteratively refining the pseudo code into syntactically correct code in a given programming language. Flowcharts serve to clarify sequential, conditional, and iterative processes, which reduce errors and guide programmers in effectively translating pseudo code logic into executable algorithms .

Problem-solving strategies such as divide and conquer, backtracking, and greedy approaches each have distinct methodologies and applications. Divide and conquer involves breaking a problem into smaller sub-problems, solving each independently, and then combining the solutions . Backtracking is a method where solutions are incrementally built and abandoned if they do not meet the criteria . The greedy approach, in contrast, makes the optimal local choice at each stage with the hope of finding a global optimum . These strategies are applied based on the nature of the problem and the efficiency required, with divide and conquer typically used for problems like sorting and backtracking for constraint satisfaction problems.

Understanding nested loops empowers programmers to efficiently generate complex patterns by controlling multiple levels of iteration, each affecting different dimensions of the output. Nested loops allow for the construction of multi-dimensional data outputs, such as grid-based patterns and pyramidal structures . By manipulating the inner loop's behavior relative to the outer loop, programmers can adjust spacing, repeat sequences, and build up intricate designs efficiently. This understanding is crucial when managing dynamically-sized inputs, ensuring scalability and flexibility in pattern generation while reducing redundant code .

Using arrays as function arguments in C programming has both advantages and drawbacks. One advantage is that it efficiently passes large datasets without copying the data itself, using pointers to refer to the array memory location . This saves time and reduces memory usage. However, a drawback is the need for careful memory management since arrays decay into pointers, which can lead to programming errors if not properly handled, such as accessing out-of-bounds memory areas or manipulating the original data inadvertently . This requires a clear understanding of pointer arithmetic and memory allocation.

You might also like