0% found this document useful (0 votes)
29 views4 pages

PPS 1

SVKM NMIMS Mumbai Programme for problem solving previous year paper for practice

Uploaded by

nishantparwani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
29 views4 pages

PPS 1

SVKM NMIMS Mumbai Programme for problem solving previous year paper for practice

Uploaded by

nishantparwani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 4
MPsTME LIBRARY SVKM’S NMIMS MUKESH PATEL SCHOOL OF TECHNOLOGY MANAGEMENT & ENGINEERING Academie Year: 2022-2023 Program: B.Tech / MBA Tech Stream: All Streams Year:I Semester: I Subject: Programming for Problem Solving Time: 03 hrs (La.amto2.pm ) Date: 16_Sun/ 2923 No. of Pages: 04 Marks: 100 Special Re-Examination Instructions: Candidates should read carefully the instructions printed on the question paper and on the cover of the Answer Book, which is provided for their use, 1) Question No. _1__ is compulsory. 2) Out of remaining questions, attempt any _4__ questions. 3) In all__5_questions to be attempted. 4) All questions carry equal marks. 5) Answer to each new question to be started on a fresh page. 6) Figures in brackets on the right hand side indicate full marks. 7) Assume Suitable data if necessary. a “Answer briefly: [20] cor fa oe Write an algorithm and draw a flowchart to calculate and print the factorial of a given | 5) sot umber. . | What will be the output of the following code? Explain your output. int main) { cos char “ptr; char St] = "qwerty"; SO-1 ee fo BL-3 piri=3; cout << ptr, retum 0; } ‘e. | What will be the output of the following code, when the user enters I’ as input and 'x’ as, input. Explain your answer. cO-2 80-6 include 8] BL4 using namespace std; int main() char ch; ‘cout<<"Enter the choice"; cin>>ch; switch(ch) { case 'I' cout<<"NMIMS"< 1 using namespace std; BLS int main { inta=0; int b= 10; if(a&&b) { cout << "true"<< endl ; } [545] else { cout << "false"<< endl } return 0; } co4 ii, Create a class CricketPlayer with player number, name, and batting average as class SO-1 data members. Define an input) function to assign values to data members and a display() BL3 function to display the player information. Create one object to store information about a player and invoke the input) and display() functions. S OT ‘Write a program to count the number of occurrences of a specific character in astring. | (10] BLS ‘Apply the given data. Basie Salary <= 10000 : HRA = 20%, DA = 80% Basie Salary <= 20000 : HRA = 25%, DA = 90% Basic Salary > 20000 : HRA = 30%, DA = 95% a6 Dearness Allowance: Deamess Allowance is given out to employees to reduce the co.3 impact of inflation on employees. {10} 80-1 House Rent Allowance (HRA): For most employees, House Rent Allowance (HRA) is a BLS part of their salary structure. Gross Salary: Gross Salary is the monthly or yearly salary before any deduictions are ce Create a class “Wall! having data members ‘height’ and ‘length’. Class Wall, mist contain ee a function which calculates Area of Wall, Nov, ereate an object ofthe above class and try | [10] a calling the function by respective object. a7 ‘Greate a class “Tamiture™ having data members ‘and "w" Derive the child lass “able™ co4 having data member ‘h’ and define the member functions accept () and display Qin class. | (10) S0-1 Create the object of derived class and access the data members from base class and BLS derived clas. Rephrase the given C7 code using do-while. (/ C+ Program to print numbers from 1 to 5 #include using namespace std; int main) 4 Q inti=1; co2 iI while loop from 1 0 5 110) S0-1 while @<=5) { BL cout <

You might also like