![Image](/post-images/cs201-mid-term-solved-mcqs-and-subjective-with-references-by-moaaz-978464.jpg)
77 Like(s)
|
CS201 Midterm Past Papers
CS201 Current midterm paper 2019 Shared by Student
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)
{
Couti*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)
Couti+1endl;
else
Coutiendl;
System("pause");
}
CS201 Current midterm paper 2019 Shared by Student
Finally I attempt my paper CS201
Total questions 1 to 23
1 to 19 only MCqs (mostly from previous papers)
2 shorts (one and two dimentonal array , file data on disk)
2 programs ( interger from user and display product with formula , and 1 long program kilogram weight ponds like this)
CS201 Current midterm paper 2019 Shared by Student
Cs201 15/12 4pm
program(marks 3): make a 2d array of 3x3
2nd question(marks 3) find the mistakes in following
If(num%2==o);
Cout"the number is even";
else()
Cout"the number is odd";
3rd question(marks 5) define the function of following
outfile.open
4rth question(marks 5) find the perimeter of a circle by taking value of radius from user. You just have to declare 2 variables peri and radius and formula is
Perimeter of circle=2*3.14*radius
5th question(marks 5) make a program which converts the weight in kgs to pounds by defining function..
Mcqs were easy if u read handouts just 2 or 3 mcqs came from past papers.. But it was easy.
CS201 Current midterm paper 2019 Shared by Student
Cs201 midterm 2019 fall dec 26
What happens if the file 'myfile.txt' does not exist and we still try to open it using the function file.open(“myfile.txtâ€, ios:out)?
Would the open() function create a new file and open it OR it will generate an error?
Determine the output of the given code segment.
int x = 2;
switch(x){
case 1:
x += 1 ;
break ;
case 2:
x += 2 ;
case 3:
x +=3 ;
break ;
case 4:
x += 4 ;
break ;
}
cout x ;
Transform the following If-else statement into switch statement.
if (x == 5)
...
else if (x == 10 || x == 11)
...
else if (x == 8)
...
else if (x == 9)
...
else
...
Write a C++ program which calculates the Net price of a book and displays it on the screen.
The Net price of book can be calculated by the following formula:
Net price = Retail Price + Sales Tax + Income Tax
Retail Price, Sale Tax and Income Tax are taken as input from the user.
Write a program which opens a file named "writeFile.txt" and moves the file pointer 100 characters forward starting from the
beginning of the file and then writes the message "Reached at position 101" at the new position in the file.
cs201 midterm MCQs past papers
Downloadcs201 midterm Subjective past papers
DownloadVU Subjects Available List
Available Subjects ListJoin Chat Room
Join ChatJoin our FB Group For VU help
Join VU Groupcs201 midterm By_Rana_Abubakar_Khan
Downloadcs201 midterm solved papers with screenshots
Download Mid Term Papers 1Download Mid Term Papers 2
Download Mid Term Papers 3
Download Mid Term Papers 4
Download Mid Term Papers 5
MCQs Test Online 1
Take a Test 1MCQs Test Online 2
Take a Test 2MCQs Test Online 3
Take a Test 3MCQs Test Online 4
Take a Test 4MCQs Test Online 5
Take a Test 5MCQs Test Online 6
Take a Test 5CS201 Current midterm paper 2019 Shared by Student
mcqs past paperz main thy
short question
1: why program is evaluated?
2: two techniques of evaluation?
3: write three type of systm software
4: how system software control all the .....
2 progrms thy ....aik weight in kg convert it in pounds kuch is trha ka
aur aik array wala tha
CS201 Current midterm paper 2019 Shared by Student
CS 201 Paper Done
Paper Bohat Easy Tha .......
Asaaan C Coding Thii .......
Errors Puchay Thy Aur kuch ki Output Show Karna thi....
Handsout main jo programs diye hai examples unko b daikh
lena aik 5 number ka program aya tha un main sey
Mcqs sary past papers sey aye thy .......
But agar handsout parhi ho kisi ney to
sabhi handsout main sey thy mcqs.....
CS201 Current midterm paper 2019 Shared by Student
Cs 201
Mcqs Koi b past ppre se ni ni ta conceptual ty 3,3 marks k 2 questions ty
ek question algorithm ko c++ expressions m chage krna ta
1).ab^3/a^2 + bax^2y+ abcx
2) ax ^2 + by^2 + cz^ 2
Q no 2
If we store character string in different length two dimensional array do memory space wasted ?
explain it
3 questions k programs bnany ty 5 ,5 marks k
Ek string wala ta
Ek array wala ta
Ek reminder wala ta
CS201 Current midterm paper 2017 Shared by Student
Today cs201 paper.z
How many dimensions in n dimension array.
Loop is also called..reptative...Structure
access array in random which approach is best
=< ,<= ,>= are called ..relational... operators
#include is called.. preprocessor directive..
Not example of int data ..-4.0..
All element of data must be of .... same type..
Analysis is the .. first..step
Array are ..call by reference...
Move to next iteration of loop .. continue statement...is used
A hierchy of classes which are used to deal with console and disk file.. iOS..
.. functions..are good for code reusability.
Bitwise and work same like.. logical.. and but on bits
SUBJECTIVE.
Write 2d array with five rows and six column and also write pointer to above array.?
Why we comment liberally in programs does they affect on performance...?
A do while loop executive ho many times at least and a while loop?
Then 2 program likhi thy inline output likhi thy ak array main say tha aur doses open file...
CS201 Current midterm paper 2017 Shared by Student
cs201 9/12/2017 _ 2:30pm paper
cs201 aj 2:30 ka mera paper
MCQS mostly moaz ki file sy thy
r long q
main(){
int x = 10
const int *ptr = &x ;
*ptr = 5 ;
}
dosra Q aesy tha
Write down the output of the code given below :
Hint:
Size of char is 1 byte
Size of int is 2 byte
Size of float is 4 byte
#include <iostream.h>
union mytypes_t {
char c;
int i;
float f;
} mytypes;
int main(){
mytypes.c = 'H';
mytypes.i = 15;
cout sizeof(mytypes)endl;
mytypes.i = 15;
mytypes.c = 'H';
cout sizeof(mytypes)endl;
system("PAUSE");
return 0;
}
r baqi yad nahi
CS201 Current midterm paper 2017 Shared by Student
cs201 mera ajka paper MCQS 90% Moaz ki file sy thy
short Q: Write down the output of the code given below :
Hint:
Size of char is 1 byte
Size of int is 2 byte
Size of float is 4 byte
#include <iostream.h>
union mytypes_t {
char c;
int i;
float f;
} mytypes;
int main(){
mytypes.c = 'H';
mytypes.i = 15;
cout sizeof(mytypes)endl;
mytypes.i = 15;
mytypes.c = 'H';
cout sizeof(mytypes)endl;
system("PAUSE");
return 0;
}
r 1 or Q: JO 3 marks ka tha wo ye
Identify the errors in the following code segment and give the reason of errors.
main(){
int x = 10
const int *ptr = &x ;
*ptr = 5 ;
}
baqi 1 programme likhta tha convert weight wala sai sy baqi yad na
Categories: Virtual University
Leave a comment