Current Papers MidTerm Fall 2019
=====================================================
**Keep visiting this site and link. Same links will be updated with time**
======================================================

Paper 1:

Cs201 current paper 14_12_2019
8:30am

Q no.1
Convert the following while loop into a for loop
Int I=1;
While(i<=h)
{
Cout<<i*I;
I++;
}

Q no.2
Given below is the code segment of a file handling program. What is the purpose of the condition given in the while loop
While(! Infile.eof())
{

Infile>> name>>sal>>dept;
Cout<< name<<"\ t"<< saal<<"\ t"<< dept<< endl;
}

Q no.3
Write a function definition which takes three arguments: retail price, sales taxes, incom tax and returns the net price of a book.
Note: the net price of the book can be calculated by the formula
Net price= retail price + sales tax + incom tax

Q no.4
Write a program which defines two string " Hello" and "Pakistan", merges both the strings using manipulation function and display on the screen.

Q no.5
What will be the output from the following program?
#include<iostream>
#include<conio.h>
Int main ( )
{
for int i=1; i<6;i++
If( i%2==0)
Cout<<i+1<<endl;
else
Cout<<i<<endl;
System("pause");
}

Post a Comment

Don't Forget To Join My FB Group VU Vicky
THANK YOU :)

Previous Post Next Post