QB For PSP
QB For PSP
1 Write a Algorithm and draw a flowchart to check if the Triangle is Equilateral, Isosceles, or Scalene.
2 Enlist the different types of operators in c and write a C program to input the age of a person and print
the message “Eligible to Vote” if the age is more than 18, otherwise print a message, “not eligible to
vote”? using ternary operator.
4 Write a program to accept a number and to check whether it is Amstrong number or not
5 WAP to accept elements of one-dimensional array from user and print the array in ascending order.
8 WAP to accept elements of one-dimensional array from user and count the total number of duplicate
elements in an array
9 Enlist 5 functions from string.h library and state their application in brief with the help of examples
10 WAP to design a structure Employee with members- Employee No, Name, Experience and
Salary.Read the information of 4 employees and display the information for employees having 5 years
or more experience and salary less than 10000.
11 Write a C program to define a function that takes two integer variables as parameters and swaps their
values using Call by reference.
12 Compare and contrast the structured programming and object oriented programming.
14
Compose an algorithm and draw a flowchart that reads three numbers and prints the value of the
largest number.
17
Compose a program to print the pattern.
* *
* * *
* * * *
18
Ellaborate about Recursion? Build a program to calculate GCD of two whether numbers using
recursive functions.
19
Explain what is Function? Compose a program using function to calculate compound interest and
amount using formula: A=P(1 + R/100)N
20 Draw a block diagram to illustrate the basic functional units of a computer.Functions of each?
21 Write an algorithm and draw a flowchart for accepting three no from the user and display the greatest
of three using the conditional operator.
23 Write a C program to input week number(1-7) and print day of week name using switch case.
24
Write the difference between structure and union
25 Write a program to store and display the name of the cricketer, runs scored and wickets taken by a
cricketer using structure
27 Define structure and explain the syntax of declaration of structure .Write a program to store the name
roll no and marks of physics , chem, and maths of n students and calculate the total of three marks