St.
Francis Institute of Technology
( Engineering College)
An Autonomous Institute, Affiliated to University of Mumbai NAAC A+
Accredited | CMPN, EXTC, INFT NBA Accredited | ISO
9001:2015 Certified
Academic year 2024 – 2025
Subject: Problem Solving with Programming
QUESTION BANK (Module 1 and 2)
Date: 11/10/24
Academic Year: 2024-25 Semester: I
Sr. Question Marks
no.
1. Write a Algorithm and draw a flowchart to find whether a number entered is
even or odd
2. Write a Algorithm and draw a flowchart to find a factorial of a number
3. Write an algorithm and draw a flowchart that reads three numbers and prints
the value of the largest number.
4. Find the grade of a student by reading marks or by taking Percentage. Here
we are assuming
■ if marks above 80 then grade is A,
■ if the Marks are between 60 to 80 Grade is B,
■ if the marks are between 40 to 59 grade is C,
■ if marks are below 40 grade if F (F means Fai
5. Write a program to To find sum of first 50 numbers
6. Program to Check if person is eligible to vote
7. WAP to read 3 sides of triangle and Display if its ‘Equilateral’ using if
statement.
8. Difference between else if ladder, nested if else, and switch
9. write a program to construct arithmetic calculator using switch.
10. Write a program to print FIBONACCI SERIES USING FOR
11. Write a program to print the pattern.
*
* *
* * *
* * * *
12. Write an algorithm and draw a flowchart that reads three numbers and prints the value of
the largest number.using conditional operator.
13. Write a program to display the user entered single digit number in words.
14. Enlist the data types in c language along with example. Give range of any three.
15. What will be the output of following code?
# include <stdio.h>
int a =10; // global variable a
int main()
{
int a=5; // local variable a
printf("\n a=%d", a); // local variable gets prints
return 0;
}
16. Write a program to swap two numbers
17. Write a C program to find whether a year is leap or not using if else?
18. Write a program to check whether string is palindrome or not.
19.
Write a program to print the following pattern. Accept number of rows from
user and display that much number of rows in output.
23
456
7 8 9 10
20. Differentiate between break and continue.
21. Write a C program to find factorial of a number
22. What will be the output of the following program?
int main()
{
int i=4,z=12;
if(i=5||z>50)
printf(“Engineering\n”);
else
printf(“Pharmacy\n”);
return 0;
}
23. What will be the output of the following program?
int main()
{
int k,num=30;
k=(num>5?(num<=10?100:200):500);
printf(“%d\n”,num);
return 0;
}
24. What will be the output of the following program?
#include<stdio.h>
#include<conio.h>
main()
{
int x=10,y,z;
z=y=x;
y-=--x;
z-=x–;
x-=--x-x–;
printf(“x=%d y=%d z=%d”,x,y,z);
getch();
}