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.

Current Final Term Papers Spring 2012 Date: 16-July-2012 to 27-July-2012

Current Final Term Papers Spring 2012 Papers, July 2012, Solved Final 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: 4280

.

+ 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

i think this file is help full 4 u.

Attachments:

Questions

1. Find the error in following syntax,

while(i<=100)

sum+=i*i;

 

2. General syntax of declaring and initializing the data members.

3. class String

{

char buf [25];

};

Write code for assignment (=) operator function which assign one String object to other object. Your code should also avoid self assignment.

 

4. Write a simple program, which will get a stream of character and output the stream of characters using cin and cout.

 

Xami gud 

My paper  16-07-2012.

 

Short questions 50% new thay.

Long questions men say jo mjhay yad hen wo yeh thay:

 

Ik while loop dia tha us ko for loop men change krna tha?

 Program likhna tha jis men “Welcome to Virtual University”  input krna tha phir is ki output is trah show krni thi

WELCOM

TO

VIRTUAL

UNIVERSITY

Yani k in letters ko upper case men convert bhi krna tha aur space ki jaga endl dal kr letters ko ilehda bhi krna tha.

\

Ik matrix 3x4 bnana tha us min 12345678 yeh integer show krnay thy

Out put yeh deni thi      1   2   3   4

                                            5    6   7   8

Keybord say input leni thi as a array.

 

Q4: What is the output of following code snippet.  (2)

// class templates
#include <iostream>
using namespace std;

template <class T>
class mypair {
T a, b;
public:
mypair (T first, T second)
{a=first; b=second;}
T getmax ();
};

template <class T>
T mypair<T>::getmax ()
{
T retval;
retval = a>b? a : b;
return retval;
}
int main () {
mypair <int> myobject (100, 75);
cout myobject.getmax();
system("pause");
}

 

Question No: 33 ( Marks: 3 )

What happens when we use new and delete operator?

Answer:

When we use new operator to create objects the memory space is allocated for the object and then its constructor

is called. Similarly, when we use delete operator with our objects, the destructor is called for the object before

deallocating the storage to the object.

Question No: 16      ( Marks: 1 ) - Please choose one

 

 

Which of the following function call is correct for the function prototype?

defaultParameters ( int a, int b = 7, char z = ‘*’ );

 

 

       defaultParameters (5);

 

 

       defaultParameters (5, ‘8’);

 

 

       defaultParameters (6, ‘#’);

 

 

       defaultParameters (0, 0, ‘*’, 0);

Question No: 17      ( Marks: 1 ) - Please choose one

 

When an operator function is defined as member function for a binary Plus (+) operator then the number of argument it take is/are.

 

 

       Zero

 

       One

 

       Two

 

       N arguments

Question No: 23      ( Marks: 1 ) - Please choose one

 

 

NULL value has been defined in ______ and _________ header files.

 

 

       strings.h and iostream.h

 

 

       ctype.h and conio.c

 

 

       conio.c and conio.h

 

 

       stdlib.h and stddef.h

 

 

 

 

Q. Suppose a program has a math class having only one data member number.

Write the declaration and definition of operator function to overload + operator for the statements of main function.

         math obj1, obj2;

         obj2= 10 + obj1  ;  

Ans:

#include <iostream.h>

math

{

mth operator + (obj1,obj2)

mth operator + (obj1,obj2)

{

 mth operator + (obj1,obj2)

mth operator + (obj1,obj2)

 

}

}

 

Great Leader Of GMI  gud keep it up & keep sharing 

cs201 today's paper

Q.make a program using getline function(5)
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.(5)
Q.what are the function of new and delete ?(3)
Q.what are the stream insertion overloaded operators?(3)

Mid term kay importan topics zaror dekh ker jain us mai say MCQ aur ak question tu zaror aata hay 5 number ka

Nasia

MCqs mostly past papers main se aye thay jin main se kuch yay hain

Friend function of a class is ______________.

  • Member function
  • Non-member function
  • Private function
  • Public function

A template function must have at least ---------- generic data type

  • Zero
  • One
  • Two
  • Three

The object _______________may be used both for file input and file output

  • fstream,
  • ifstream,
  • ofstream,
  • none of the given options

What should be the return type of the constructor?

  • void pointer
  • int
  • same as object type
  • constructors do not return any thing

Classes defined inside other classes are called ________ classes.

  • Looped
  • Nested
  • Overloaded
  • none of the given options.

new operator is used to allocate memory from the free store during

  • Compile Time
  • Run Time
  • Link Time
  • None of the given options

Which kind of functions can access private member variables of a class?

  • Friend functions of the class
  • Private member functions of the class
  • Public member functions of the class
  • Friend, private and public functions

The normal source of cin object is

  • File
  • Disk
  • Keyboard
  • RAM

Which value is returned by the destructor of a class?

  • A pointer to the class.
  • An object of the class.
  • A status code determining whether the class was destructed correctl
  • Destructors do not return a value.

 C is widely known as development language of _______ operating system.

  • Linux
  • Windows
  • Unix
  • Mac OS

Like member functions, ______ can also access the private data members of a class.

  • Non-member functions
  • Friend functions
  • Any function outside class
  • None of the given options
  1. The stream insertion and stream extraction operators are already overloaded for ______.
  • User-defined data types
  • Built-in data types
  • User-defined and built-in data types
  • None of the given options

The appropriate data type to store the number of rows and colums of the matrix is____________.

  • Float
  • Int
  • Char
  • none of the given options.

A Matrix can be composed of ints, floats or doubles as their elements. Best way is to handle this ,

_______________.

  • Write a separate class to handle each
  • Use templates
  • Use strings to store all types
  • None of the given options

cout setfill(‘0’) setw(7) 128 ;

  • 0000128
  • 0128128
  • 1280000
  • 0012800

Which of the following is the correct way to declare a variable x of integer type?

  • x int ;
  • integer x ;
  • int x;
  • x integer

Q.1: Using setw and setfill manipulators to display Virtual--------University.

Q.2: Write a program to display:

          If you age is less than or equal to 18 then display "you are child"

          if your age is above 18 or less than 35 then display "you are adult"

          if your age is is above 60 then display "you are senior citizen"

Bakiiiii yaaaad niiiii

 

 ღ**ღнєяяєиღ**ღ gud keep it up & keep sharing 

Q.make a program using getline function(5)
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.(5)
Q.what are the function of new and delete ?(3)
Q.what are the stream insertion overloaded operators?(3)

By M.Usman905

Today may paper of cs201… CS201- Introduction to Programming McZee mix new and old…40 marks Long,, All are program and its code..Find error in class,, templates..And matrix programs Question No: 31 (Marks: 3 ) What will be the output of following functions if we call these functions three times? 1) void func1(){ int x = 0; x++; cout x endl; } Answer: 1 1 1 2) void func2(){ static int x = 0 ; x++; cout x endl ; } Answer: 1 2 3 5marks question explain each statement…. Streamposorg=afite.tellp(); Afilte.sekp(0,ios::end); Ya teak say yad nahi ha Must see mid team paper also…… Best of luck

aoa. i think mera n usman bhai ka paper milta hy.

objctv nd subjctv dono k liye stream insertion & stream extraction ke concept bohat ache hone chahiyen.

mooaz file mei se 5-6 objctv they.

total 52 qustn they,

40 were objectives.

5 program they,

qustn 48-52

1-class template  add(); 2 variable lene they of float type. unpe add func apply karna tha main mei n then sum return karana tha.

2.what is the difference b/w get() and getline()? explain with coding example.

3.ek program friend function pe tha usko class mei declare kara k cout karana tha.

4.ek program mei +operator ko overload karana tha.and two objcts ka sum karana tha of string type.

sorry itna hi yaad hai.

RSS

Latest Activity

Kashif Iqbal commented on + M.Tariq Malik's group FIN630 Investment Analysis & Portfolio Management
4 minutes ago
Kashif Iqbal joined + M.Tariq Malik's group
5 minutes ago
Asad farooq replied to Asad farooq's discussion edu401 assignmnt 2 need in the group EDU401 Contemporary Issues and Trends in Education
9 minutes ago
Asad farooq added 2 discussions to the group EDU401 Contemporary Issues and Trends in Education
11 minutes ago
Asad farooq joined + M.Tariq Malik's group
16 minutes ago
Rehana Awan BSSE(7th semester) replied to Rehana Awan BSSE(7th semester)'s discussion cs311 Assignment 3 in the group CS311 Introduction to Web Services Development
16 minutes ago
Aleem ullah replied to Aleem ullah's discussion CS 205 Assignment # 3 fall in the group CS205 Information Security
27 minutes ago
+ "αяsαℓ " Ќąƶµяɨ •" replied to + Drama Queen ! ! ! ! ! ! ! ! !'s discussion ❤️❤️❤️❤️❤️HapPiii BIrthday INNO BHAI ❤️❤️❤️❤️❤️❤️ Our Beloved MOD!!!!!!❤️❤️❤️❤️❤️❤️❤️❤️❤️
33 minutes ago
Asad farooq replied to + M.Tariq Malik's discussion CS507 Assignment No 03 Spring 2019 Solution & Discussion in the group CS507 Information Systems
36 minutes ago
Asad farooq replied to + M.Tariq Malik's discussion CS507 Assignment No 03 Fall 2019 Solution & Discussion in the group CS507 Information Systems
43 minutes ago
+ ! ! AɳƓєℓ ❥ replied to + Drama Queen ! ! ! ! ! ! ! ! !'s discussion ❤️❤️❤️❤️❤️HapPiii BIrthday INNO BHAI ❤️❤️❤️❤️❤️❤️ Our Beloved MOD!!!!!!❤️❤️❤️❤️❤️❤️❤️❤️❤️
48 minutes ago
彡Faria彡 ❤️ replied to Rome's discussion *دستبرداری*
51 minutes ago

Today Top Members 

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

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

.