Job Saarnee

JOB SAARNEE

Top Most Platform for Job Updates O Level Results Answer keys AKTU MCQs

Programming for Problem Solving PPS | ALL STUDY MATERIAL | 99+ MOST IMPORTANT QUESTION WITH SOLUTION

 Programming for Problem Solving (KCS101/KCS 201)

This blog cover all the programs and important question related to Programming for Problem Solving using C programming language.

Course Outcome ( CO) Bloom’s Knowledge Level (KL)

At the end of course , the student will be able to understand

CO 1 To develop simple algorithms for arithmetic and logical problems.

CO 2 To translate the algorithms to programs & execution (in C language).

CO 3 To implement conditional branching, iteration and recursion. 

CO 4 To decompose a problem into functions and synthesize a complete program using divide and conquer approach.

CO 5 To use arrays, pointers and structures to develop algorithms and programs.

Programming for Problem Solving PPS

Detailed Syllabus

Unit I (Introduction to Programming)

Introduction to components of a computer system: Memory, processor, I/O Devices, storage, operating system, Concept of assembler, compiler, interpreter, loader and linker.

Idea of Algorithm: Representation of Algorithm, Flowchart, Pseudo code with examples, From algorithms to programs, source code.

Programming Basics: Structure of C program, writing and executing the first C program, Syntax and logical errors in compilation, object and executable code.

Components of C language. Standard I/O in C , Fundamental data types, Variables and memory locations, Storage classes.


2 marks important question 

click here 

Long Answer Question with Answer

click here 

Most Frequently Asked Question with Answer

click here 


Unit II (Arithmetic expressions & Conditional Branching)

Arithmetic expressions and precedence : Operators and expression using numeric and relational operators, mixed operands, type conversion, logical operators, bit operations, assignment operator, operator precedence and associativity.

Conditional Branching: Applying if and switch statements, nesting if and else, use of break and default with switch.


2 marks important question 

click here 

Long Answer Question with Answer

click here

Most Frequently Asked Question with Answer

click here


Unit III  (Loops & Functions )

Iteration and loops: use of while, do while and for loops, multiple loop variables, use of break and continue statements.

Functions: Introduction, types of functions, functions with array, passing parameters to functions, call by value, call by reference, recursive functions.


2 marks important question 

click here 

Long Answer Question with Answer

click here

Most Frequently Asked Question with Answer

click here


Unit   IV (Arrays & Basic  Algorithms)

Arrays: Array notation and representation, manipulating array elements, using multi dimensional arrays. Character arrays and strings, Structure, union, enumerated data types, Array of structures, Passing arrays to functions.

Basic Algorithms: Searching &Basic Sorting Algorithms (Bubble, Insertion and Selection), Finding roots of equations, Notion of order of complexity.


2 marks important question 

click here 

Long Answer Question with Answer

click here 

Most Frequently Asked Question with Answer

click here 


Unit V (Pointer & File Handling )

Pointers: Introduction, declaration, applications, Introduction to dynamic memory allocation (malloc, calloc, realloc, free), Use of pointers in self-referential structures, notion of linked list (no implementation)

File handling: File I/O functions, Standard C preprocessors, defining and calling macros, command-line arguments.


2 marks important question 

click here 

Long Answer Question with Answer

click here 

Most Frequently Asked Question with Answer

click here 


Text books:

1. Schaum’s Outline of Programming with C by Byron Gottfried , McGraw-Hill

2. The C programming by Kernighan Brain W. and Ritchie Dennis M., Pearson Education .

3. Computer Basics and C Programming by V.Rajaraman , PHI Learning Pvt. Limited, 2015.

4. Computer Concepts and Programming in C, E Balaguruswami, McGraw Hill

5. Computer Science- A Structured Programming Approach Using C, by Behrouz A. Forouzan, Richard F. Gilberg, Thomson, Third Edition , Cengage Learning – 2007.

6. Let Us C By Yashwant P. Kanetkar.

7. Problem Solving and Program Design in C, by Jeri R. Hanly, Elliot B. Koffman, Pearson Addison-Wesley, 2006.

Programming for Problem Solving Lab

Course Outcome ( CO) Bloom’s Knowledge Level (KL)

At the end of course , the student will be able to:

CO 1 Able to implement the algorithms and draw flowcharts for solving Mathematical and Engineering problems.

CO 2 Demonstrate an understanding of computer programming language concepts.

CO 3 Ability to design and develop Computer programs, analyzes, and interprets the concept of pointers, declarations, initialization, operations on pointers and their usage.

CO 4 Able to define data types and use them in simple data processing applications also he/she must be able to use the concept of array of structures.

CO 5 Develop confidence for self education and ability for life-long

learning needed for Computer language.

 

LAB 1 Write a program to calculate the area of triangle using formula at=√s(sa)(s-b)(s-c)

***********************

Sol: Click Here

**********************************

LAB 2 Basic salary of an employee is input through the keyboard. The DA is 25% of the basic salary while the HRA is 15% of the basic salary. Provident Fund is deducted at the rate of 10% of the gross salary (BS+DA+HRA). Program to calculate the Net Salary.

**********************

Sol: Click Here

**********************

LAB 3 Write a program to determine the roots of quadratic equation.

LAB 4 Write a program to find the largest of three numbers using nested if else.

**********************

Click here

**********************

LAB 5 Write a program to receive marks of physics, chemistry & maths from user

& check its eligibility for course if

a) Marks of physics > 40

b) Marks of chemistry > 50

c) Marks of math’s > 60

d) Total of physics & math’s marks > 150

or

e) Total of three subjects marks > 200

LAB  6 Write a program to find the value of y for a particular value of n. The a, x,

b, n is input by user

if n=1 y=ax%b

if n=2 y=ax2+b2

if n=3 y=a-bx

if n=4 y=a+x/b 

 

LAB 7 Write a program to construct a Fibonacci series upto n terms.

LAB 8 Write a program to find whether the number is Armstrong number.

******************

Click Here

******************

LAB 9 Write a program to generate sum of series 1!+2!+3!+————–n!

******************************

Click Here

******************************

LAB 10 Write a program to find the sum of following series 1-X1/1!+X2/2!-…………Xn/n!.

********************

 

********************

LAB 11 Write a program to print the entire prime no between 1 and 300.

********************

Click Here

********************

LAB 12 Write a program to print out all the Armstrong number between 100 and 500.

*****************************

Click Here

*****************************

LAB 13 Write a program to draw the following figure:

3 2 1

21

1

*

**

***

*******************

Click here

******************

LAB 14 Write a program to receive a five-digit no and display as like 24689:

2

4

6

8

9

*******************

Click Here

*******************

LAB 15 Write a function that return sum of all the odd digits of a given positive no entered through keyboard.

*******************

click here

*******************

LAB 16 Write a program to print area of rectangle using function & return its value to main function.

LAB 17 Write a program to calculate the factorial for given number using function.

*******************

click here

*******************

LAB 18 Write a program to find sum of Fibonacci series using function.

*******************

click here

*******************

LAB 19 Write factorial function & use the function to find the sum of series S=1!+2!+—–n!.

*****************************

Click Here

*****************************

LAB 20 Write a program to find the factorial of given number using recursion.

LAB 21 Write a program to find the sum of digits of a 5 digit number using recursion.

LAB 22 Write a program to calculate the GCD of given numbers using recursion.

LAB 23 Write a program to convert decimal number in to binary number.

LAB 24 Write a program to convert binary number in to decimal number.

LAB 25 Write a program to delete duplicate element in a list of 10 elements & display it on screen.

LAB 26 Write a program to merge two sorted array & no element is repeated during merging.

LAB 27 Write a program to evaluate the addition of diagonal elements of two square matrixes.

LAB 28 Write a program to find the transpose of a given matrix & check whether it is symmetric or not.

LAB 29 Write a program to print the multiplication of two N*N (Square) matrix.

LAB 30 Write a program in C to check whether the given string is a palindrome or not.

LAB 31 Write program to sort the array of character (String) in alphabetical order like STRING in GINRST.

LAB 32 Write a program to remove all the blank space from the string & print it, also count the no of characters.

LAB 33 Write a program to store the following string “zero”, “one” ——-“five”. Print the no in words, given in figure as 3205.

LAB 34 Write a program to compare two given dates. To store a date uses a structure that contains three members namely day, month and year. If the dates are equal then display message equal otherwise unequal.

LAB 35 Define a structure that can describe a hotel. It should have the member that includes the name, address, grade, room charge and number of rooms. Write a function to print out hotel of given grade in order of room charges.

LAB 36 Define a structure called cricket with player name, team name, batting average, for 50 players & 5 teams. Print team wise list contains names of player with their batting average.

LAB 37 Write a c program to copy & count the character content of one file says a.txt to another file b.txt.

LAB 38 Write a program to take 10 integers from file and write square of these integer in other file.

LAB 39 Write a program to read number from file and then write all ‘odd’ number to file ODD.txt & all even to file EVEN.txt.

LAB 40 Write a program to print all the prime number, between 1 to 100 in file prime.txt.

LAB 41 Write the following C program using pointer:

a) To sort the list of numbers through pointer

b) To reverse the string through pointer.

LAB 42 Write a program to find the largest no among 20 integers array using dynamic memory allocation.

LAB 43 Using Dynamic Memory Allocation, Write a program to find the transpose of given matrix.

LAB 44 Write a program to find the factorial of given number using command line argument.

LAB 45 Write a program to find the sum of digits of a 5 digit number using command line argument.

 

MOST FREQUENTY ASKED PROGAMS IN AKTU EXAM FROM PPS

 Q1 Write a C program to add first seven terms of the following series using for loop. 
1/1! +2/2! +3/3! +——–
 
Q2 Write a C program to sort set of integers in ascending order by using bubble sort technique. 
 
Q3 Write a program to check the number is palindrome of not. The program should accept any arbitrary number typed by user 
 
Q4 Write a program to print check a number is prime number or not 
 
Q5 Write a program to print the Fibonacci series using recursion.
 
Q6 Write a program to multiply two matrices (read size and number of element of matrices from the keyboard). 
 
Q7 Write a program to copy the contents of one file into other file?
 
Q8 Write a recursive function in c, which takes an input from user to calculate a factorial using the recursion concept ?
 
Q9 Explain linear search and binary search technique for searching an item in a given array? also write the complexity for each searching technique?
 
Q10 A certain grade of steel is graded according to the following condition
c1: Hardness must be greater than 50
c2: Carbon content must be less than 0.7
c3: Tensile strength must be less than 5600
The grades are as follow
Grade is 10 if all the three condition are met
Grade is 9 if all the  c1 and c2 are met
Grade is 8 if all the  c2 and c3 are met
Grade is 7 if all the  c1 and c3 are met
Grade is 6 if only condition is met
Grade is 5 none of the condition are met
Write a program which will require the user to give values of hardness, carbon content and tensile strength of the steel under consideration and output the grade of the steel?
 
Q11 Write an algorithm for swapping two numbers using call by reference technique? Also write a C program for the above stated algorithm?
 
Q12 Write a algorithm for selection sort? Sort the following number using selection sort technique 26,54,93,17,77,31,44,55,20?
 
Q13 Write a program in C to multiply a matrix of dimension 4 * 4 and store the result in another matrix;
 
Q14 Write a program in C to print the following
A
BA
ABA
BABA
ABABA
 
Q15 Write a program in C and draw flow chart to find whether a given number is prime or not?
 
Q16 Write a program in C to copy the text of one file to another?
 
Q17 Write a program in C for printing Fibonacci series upto a tearm given by user using recursion?
 
Q18 Write a C program to swap the values of two variables making the 
use of pointers. 
 
Q19 Write a program in C to print the number of days using switch statement.
 
Q20 Write a program to print all the diagonal elements of the Matrix.
 
Q21 Write a program to rearrange a list of names in ascending order.
 
Q22 Write a program to generate the following pattern
*
* *
* * *
* * * *
 
Q23 Suppose a file contains student’s records with each record containing name and age of a student. Write a C program to read these records and display them in sorted order by name.
 
Q24 Write a program to find the Armstrong number from 1 to 100
 
Q25 Write a program to generate a following number structure 
12345
1234
123
12
1
 
Q27 Write a program in C to create a database of fifty student to store personal details such as roll no, name and marks? Print all the details of student whose name is enter by user?
 
Q28 Write a program that calculate sum of the digits of an integer. For example, the sum of the digit of the number 2155 is 2+1+5+5 or 13.The program should accept any arbitrary number typed by user.
 
Q29 Suppose a file contains student’s records with each record containing name and age of a student. Write a C program to read these records and display them in sorted order by name
 
Q30 A company gives insurance to its drivers in the following cases: 
 (i) If the driver is married. 
 (ii) If the driver is unmarried, male & above 30 years of age. 
 (iii) If the driver is unmarried, female & above 25 years of age. 
In all other cases, the driver is not insured. If the marital status, gender and age of a driver are inputs, write a program to determine whether the driver is to be insured or not. 
 
Q31 Write a program in C to reverse a string through pointer?
 
Q32 Write a C program to count the number of character in a file?
 
Q33 Write a program in C language to append some more text at the end of an existed text file?
 
Q34 Write a program to check the number is palindrome or not?
 
Q35 Write a program in C to print the following pattern
234567
34567
4567
567
67
7
 
 

 

# pps important questions with answers pdf, # pps important questions unit wise, #pps important questions and answers, #pps b tech 1st year important questions, #pps important questions 2022,
#pps question paper 2022, #Programming for Problem Solving, # btech 1st year pps important questions, #pps important questions 2022, #pps important questions 2021, #pps question paper 2021, # pps important topics, #pps b-tech 1st year question paper, #pps important questions unit wise

 

Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart

You cannot copy content of this page