We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More


Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

CS201 All Current Mid Term Papers Spring 2013 (25 May 2013 ~ 06 June 2013) at One Place

From 25 May 22, 2013 to 06 June 2013 Spring 2013

Current Mid Term Papers Spring 2013 Papers, May 2013 Mid Term Papers, Solved Mid Term Papers, Solved Papers, Solved Past Papers, Solved MCQs

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 4620

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Replies to This Discussion

Please Share your Current Papers mid Term Papers Spring 2013 Questions/Pattern here to help each other.

Share your today midterm paper here in reply of this discussion

Thanks

CS201 PAST PAPERS Virtual University, CS201 VU MID TERM Spring 2013 Paper, CS201 VU Midterm Current & Past Papers, CS201 VU PAST PAPERS, SPRING 2013 Current PAPERS, SPRING 2013 SEMESTER VU PAPERS, SPRING 2013 VU PAPERS, VIRTUAL UNIVERSITY HELP BLOG, Virtual University Help Website, Virtual University Past Old Midterm Papers, VU, VU ASSIGNMENT SOLUTION CENTER, VU ASSIGNMENT SOLUTIONS Help Website, VU Assignments SOLUTIONS BLOGS, VU BLOGS, VU Current Midterm Papers & Patterns, VU CURRENT PAPERS WEBSITE, VU MID TERM PAPERS, VU MIDTERM PAPERS, VU Midterm Papers Spring 2013, VU PAPERS, VU PAPERS WEBSITE, VU PAST MIDTERM PAPERS, VU Past Midterm Papers & Patterns Download, VU PAST PAPERS WEBSITE, VU SOLUTIONS WEBSITE, VU STUDY HELP BLOGS Website, VU WEBSITES

 

wo jo 2nd assignment mein programm aya tha ose jasa programm aya tha frq itna tha os mein string ko reverse kr ka lechna tha aur pointer mein store krwana tha

Ali Raza Marchal BSCS[Hons] 2nd thanks for sharing 

Zulfiqar Ahmad Zakki thanks for sharing 

Attention Related Mid Term papers Spring 2013: All Fellows You don’t need to go any other site for current Mid Term papers Spring  2013, Because All discussed data/sharing of our members in this discussion are going from here to other sites. You can judge this at other sites yourself. So don’t waste your precious time with different links.

q.1 ifstream myFile;

myFile.opn("myfile.txt");

Pge no205

Write a code to open a file name "myfile.txt"?

// basic file operations
#include <iostream>
#include <fstream>
using namespace std;

int main () {
ofstream myfile;
myfile.open ("Example.txt");
myfile "www.vulearners.com\n";
myfile.close();
return 0;
}

Explain loop and its types while, do while and for loop?

Loops are basically means to do a task multiple times, without actually coding all statements over and over again.

For example, loops can be used for displaying a string many times, for counting numbers and of course for displaying menus.

Loops in C++ are mainly of three types :-

1. 'while' loop
2. 'do while' loop
3. 'for' loop


'while' loop

A while loop can also terminate when a break, goto, or return within the statement body is executed. Use continue to terminate the current iteration without exiting the while loop. continue passes control to the next iteration of the while loop.

Syntax:

The syntax of a while loop in C++ is:

while(condition)
{
statement(s);
}

Here statement(s) may be a single statement or a block of statements. The condition may be any expression, and true is any nonzero value. The loop iterates while the condition is true.

When the condition becomes false, program control passes to the line immediately following the loop.

'do while' loop

A do...while loop is similar to a while loop, except that a do...while loop is guaranteed to execute at least one time.

Syntax:

The syntax of a do...while loop in C++ is:

do
{
statement(s);
}while( condition );

Notice that the conditional expression appears at the end of the loop, so the statement(s) in the loop execute once before the condition is tested.

If the condition is true, the flow of control jumps back up to do, and the statement(s) in the loop execute again. This process repeats until the given condition becomes false.

'for' loop

A for loop is a repetition control structure that allows you to efficiently write a loop that needs to execute a specific number of times.

Syntax:

The syntax of a for loop in C++ is:

for ( init; condition; increment )
{
statement(s);
}

Write a programme which open the file named “this.txt”and using write ( ) function writes the string “introduction to programming” at the end of the file.At the end close the programme properly .               5

 

Write down the output of the following code segment .

 

            Intnum[10]=[2,3,5,8,9,10,12,15,19,20]

            Int*ptr=num;

For int i=o; i<10, i+=2

{

Cout(ptr+i)<,”;

}                                                                      5

 

When a pointer is incremented,what happens in the following cases?

a)single-dimensional array

b)two –dimensional array                                           3

    write down syntax in two different ways to intilize charcter array with strings”programming”               2

 

what happen  if the file “myfile.*does not exists and we still try to open it using the function file open (“myfile.txt”ios:out)?            2

Permalink Reply by Princess 1 hour agoDelete

My todays paper is 

10 mcqs from moaaz file 

5 marks question 

Define a structur inventory which  have followind data member

char array to store a string

int name

and 1 aur name tha 

short questions error remove krne thay code se.

1 pointer se related program dia tha uski output likhna thi.

Q.write a program that takes a string and then prints the string in reverse using pointers?? 5 marks



Read more: Please Share Your current paper here - Virtual University of Pakistan http://vustudents.ning.com/group/cs201introductiontoprogramming/for...

) What happens when we use new and delete operator?
2) Question: Suppose an object of class A is declared as data member of class B.
(i) The constructor of which class will be called first? Answer A
(ii) The destructor of which class will be called first? Answer B(from past papers)
3) Write a program which defines five variables which store the salaries of five employees, using setw and setfill manipulators to display all these salaries in a column. Note: Display all data with in a particular width and the empty space should be filled with character x Output should be displayed as given below: (from past papers)
xxxxxx1000
xxxxxx1500
xxxxx20000
xxxxx30000
xxxxx60000

4)Overflow condition is used in repetition structure at which point it oocurs?
5)Is it possible to overlad operation for primitive data types.

6) Let we have a class,
class String
{
private: char buf[25];
}; Write code for assignment (=) operator function which assign one String object to other object. Your code should also avoid self assignment(from past paper)
7)What happen when an object is assigned to another object without overloading an assignment operator?
8)Write function name sum which accepts an integer as a argument in the function use a static variable to add the value passed to it as argument with each function call is the endl display the sum of value pass an argument:
9) Question No: 40 ( Marks: 10 ) Write a program which consists of two classes, Date and Person. Date class should contain three data members day , month , year and setter and getter function for these data members. Date class should also contain showdate() member function to display date.
Person class should contain three data members Name, Address, and Bday , where Name and Address are char pointer while Bday(Date of birth) is of type Date, Person class should further contain two member functions Display() and setdate().
CS201
Q1: (Marks 5) Write a program that defines a Template function named Add () which adds two numbers returns Sum. Define two variables of int type in the main and then call Add () function on that.
Output should be like this:
Adding numbers (don’t remember here what was written)
Enter first number:
12
Enter second number:
25
Sum=37
Q2: (Marks 5) Find the error in the program and then remove this. (Don’t remember the coding)
Q3: (Marks 5) Given the class Data
main()
{
class Date
{
private:
int day, month, year;
public:
day=01;
month=10;
year=2010
}
……………..Dont remember the lines
……………..
……………..
}
Use the dynamically allocation (don’t remember what)
In the last also free memory allocation.
Q4: (Marks 3) Why goto is not recommended to use in programmes?
Q5: (Marks 2) Write two types of data conversions used for used defined data types.
Q6: (Marks 2) Write the following using logical operators:
1. number is both multiple of 4 and 6
2. number is even but not 8
3. answer is either N or n
4. don’t remember this
Q7: (Marks 3) Write the output of the following if “int 5” is passed to the variable:
Template <class T);
T reciprocal (T x);
{
return (1/x);
}
(it was like something. Don’t remember exactly)
Q8: (Marks 3): How can we determine that dynamically memory allocation has been set successfully or not is C++ using the new operator?
Q.make a program using getline function
Q.make a program using template function select two floating point number and add them with add() function.(5)
Q.make a program take salary and pay tax of 5% if salary is less than 10,000 and pay 7% if the salary is greater than 10,000 using switch function.
Q.what are the function of new and delete ?
Q.what are the stream insertion overloaded operators?
Q Write a program which open a file name “this.txt” and then using write() function, writes the string “Introduction to Programming” at the end of the file.
Q What will be the output of the program:
Int x=10;
Int&y=x;
Y+=5;
Coutx;
Q A two dimensional array has 3 rows and 4 columns. Write down the syntax to initialize first element of all three rows of two dimensional array with value 2.
Q How can we initialize an object which is created as constant data member in another class?
Q An array delare int day[]={1,2,3,4,5,6,7}
How many elements have?
If the declaration ofarray is changed to int days[7]={1,2,3,4,5,6,7}
How many elements have?
CS201 Todays Paper

Q1: can we create an array of object for a class having defualt constrctor?
Q2: overloaded member function using ostream and istream show any example?
Q3: write c++ code to overload subscript [] operator for string class?
Q4: what does you meant by static data memberin c++:
Q5: explain the terms predecrenent and postdecrement ?

CS201 VU Current Midterm Spring 2013 Papers

CS201 VU Current Midterm Spring 2013 Papers

6 mcqs the

which bit is used as a single bits? 2 marks

write one major use of pointer? 2 marks

write general syntax of function? 2marks

what is file handing and it is used in c++? 3 marks

program from pointer or function ? 5 marks

what is file,and explain the concept of file handling? 5 marks

Another  Paper:

16 MCQs. 80% from past papers.
difference between random access ans sequential access file? (10 marks)
which bit is used as a single bits? 2 marks
what is file handing?(3 marks)
aik program ki output btani thi.(3 marks)
aik program bana tha jis ki vlue n ho oor usy matrix ma banan tha smthing like that. (ya mjy nai ata tha) [10 marks]

RSS

Latest Activity

Awais Ahmad liked ALEENA's profile
3 minutes ago
Fazal ur Rehman replied to + M.Tariq Malik's discussion SOC101 Assignment No 01 Fall 2019 Solution & Discussion Due Date: 21-11-2019 in the group SOC101 Introduction to Sociology
38 minutes ago
Fazal ur Rehman joined + M.Tariq Malik's group
38 minutes ago
Khuzamah Rasheed replied to + M.Tariq Malik's discussion EDU402 Curriculum Development Assignment No 01 Fall 2019 Solution & Discussion in the group EDU402 Curriculum Development
41 minutes ago
Khuzamah Rasheed joined + M.Tariq Malik's group
41 minutes ago
ALEENA and Adilshahid are now friends
45 minutes ago
Sami joined + M.Tariq Malik's group
46 minutes ago
Khuzamah Rasheed posted a status
"full solution"
48 minutes ago
Khuzamah Rasheed posted a status
"kisi ke pas 402 code ki assignment hy fall 2019"
48 minutes ago
+ ! ! ! ! Mehαr Mαh꧂ posted a video

Wintergatan - Marble Machine (music instrument using 2000 marbles)

Get the audio track "Marble Machine" by Wintergatan: https://wintergatan.bandcamp.com/track/marble-machine Marble Machine built and composed by Martin Molin ...
56 minutes ago
+ M.Tariq Malik replied to + M.Tariq Malik's discussion MTH501 Assignment No 01 Fall 2019 Solution & Discussion Due Date: 19-11-2019 in the group MTH501 Linear Algebra
56 minutes ago
+ M.Tariq Malik replied to + M.Tariq Malik's discussion MGT603 Strategic Management Assignment No 01 Fall 2019 Solution & Discussion in the group MGT603 Strategic Management
57 minutes ago
+ M.Tariq Malik liked + M.Tariq Malik's discussion MGT603 Strategic Management Assignment No 01 Fall 2019 Solution & Discussion
57 minutes ago
+ M.Tariq Malik added a discussion to the group MGT603 Strategic Management
58 minutes ago
+ M.Tariq Malik replied to + M.Tariq Malik's discussion MGT501 Human Resource Management Assignment No 01 Fall 2019 Solution & Discussion in the group MGT501 Human Resource Management
58 minutes ago
ALEENA replied to + M.Tariq Malik's discussion MTH501 Assignment No 01 Fall 2019 Solution & Discussion Due Date: 19-11-2019 in the group MTH501 Linear Algebra
58 minutes ago
+ M.Tariq Malik liked + M.Tariq Malik's discussion MGT501 Human Resource Management Assignment No 01 Fall 2019 Solution & Discussion
58 minutes ago
ALEENA joined + M.Tariq Malik's group
58 minutes ago
+ M.Tariq Malik added a discussion to the group MGT501 Human Resource Management
59 minutes ago
+ M.Tariq Malik replied to + M.Tariq Malik's discussion HRM613 Performance Management Assignment No 01 Fall 2019 Solution & Discussion in the group HRM613 Performance Management
1 hour ago

© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service