Friday, February 17, 2012

(Attock VU Group) CS201 current paper

Thank u so much bhai

---------- Forwarded message ----------
From: Shahzad Sadiq <lushahz@gmail.com>
Date: Fri, Feb 17, 2012 at 1:06 AM
Subject: Re: CS201 current paper
To: Bjiya <mc110203584@vu.edu.pk>


Sister plz check the current papers shared in different places...............Not my subject iss liaye ziyada idea nahi hai......sahi bhi hain ya nahi..............agar sahi hain tau plz group mein bhi share kar dijiaye ga....taakay ziada students ka faida ho sakay...............:)
mcqs pooranay aye thay...

75% paper mein template per hi baat hoi
15% classes n inheritance tha
aur baki ka 10 % mix mein se tha...

so templates ko mostly prepare karen.


Another Paper............................................

kuch Q  yad han mugay bro and sis ko share ker raha hun.
1.define disk cleanup
2.window
3.header file
4.word processor



Another paper....................................................

My today papers is
Total questions is 54 and 40 mcqs
4 questions of 2 marks
4 questions of 3 marks
4 questions of 5 marks
mostly mcqs from past papers and the long questions about classes and friendship


Another paper..................................................

Object Oriented Programming (OOP) current paper 03-02-2012
[/size][/font][font=Arial][size=medium]
current paper 304 cs Rj Adii
what is stack un winding?

what is templet?

what is relation ship between person and teacher?? diagaram thi?

what is iterator?

what is types of iterator?

long Question horse is a good pet animal describe by oop that about horse?

give C++ code to simplyfiy that oop is case senstive

(please friends dua lazmi karna mery liay mera paper normal howa hai so ap ki dua ki b zaroort hai) 

give c++ code and define a templete fuction

c++ code that eror corect karna tha .....templete ka tha??

eror handling ki type this?? 

aur mcqs half past say half new thay...


Another paper........................................................

.....write general syntax of 2 way friend realtionship B/W the 2 classes(class 1 n class 2)
......write a code using setf() functionto display an integer value 4000 in a 15-digit feid by right justification.
......write a main function which creates two object of classes "my class" for int and double data types.
....write a program which defines a template function name Add() which add 2 values n return their sum.
.....write a peice of code which decalre matrix 3*3 n initialize all its location with 0.
.....decalre overloading insertion and extraction operation for the object d data type.
...write following eq. in C format.  ax^3ay^2+bax^2y+a^3cx
.....three more question of coding(wo bht bare the is liye nae note kiye)


Another paper....................................................

my CS201 paper was on 3rd of feb .. all i can say is just focus more on the lesson from 25-42 .... like templates and overloading part

Another paper....................................................

Cs201 final paper                                      07\02\2012
 
Mcqs were easy and from past papers.
Write down the syntax in two different ways to initialize character array with string 'programming'. 2
 
Write the C++ code for the declaration of overloaded stream insertion(>>) and stream extraction() operator for the object d of type Date. 2 marks
 
 
What happens when an object is assigned to another object without overloading an assignment operator? 2 marks
 
Suppose there is a template function 'func' having argument of type U and return type T. What will be the C++ syntax to call this function, when we pass a variable 'x' of type double and it is returning an int type? 2 marks
 
If the requested memory is not available in the system then what does calloc(), malloc() and new operator return? 3 marks
 
Which one of the given two methods is better to read from a file and Why ?  3 marks
Using stream insertion operator >>
Using get() function
Write a function named Sum which takes an integer as its argument and uses a static integer variable to keep track of the sum of all values passed to it during the running of a program.  3 marks
 
Given is the code for nested classes.
class First
{    
    public:
       
        class Second    
        {     public:            
                Second()
                {
                    fValue = 20;
                }   
               void Display();
            private:
                int fValue;                
        };     
};
Write the code to define Display() member function of class inner class outside the body of outer class. The function Display() will display the value of data member fValue of class First. 3marks
Briefly explain the logic of given code. Also determine what is the value of 'counter' variable if the code below is executed ? 5 marks
 
main()
{
   int num = 5;   
  int counter=0;
   while(num != 0)
   {
       if ( num & 01)
         counter++;    
       num>>=1;      
   }
   return 0;
}
 
Using Template (code given) have to write a function square() that takes "x" as double but return its square as integer.  5marks
 
One  question was from the phone example in the handouts. Have to write part of missing code . 5marks
 
Using manipulation operator show
Virtual--------university (8 – character between them) 5 marks


Another paper......................................................

CS201 Fall 2011 Final Term Feb 2012 – VU Current Paper – 13 Feb 2012
> What is the impact of formalization (high or low) on employee's behavior? (3)
> Explain the process Consultation technique of organizational development. (3)
> Individual differences moderate the level of experienced stress that is caused by any action, situation or event. What are the factors that moderate the level of experienced stress other than individual differences? (3)
> Organizations are not isolated and closed system they are influenced by the things happening around. Summarize the effects of technology and competition on the organizational structure. (5)
> Explain the 4-P Cycle of Continuous Improvement. (5)
> What purposes do performance evaluation serves in organizations? (5)
> What are the ingredients of Total Quality Management? (5)


Another paper.....................................................

Mcqs were easy and from past papers.
Write down the syntax in two different ways to initialize character array with string 'programming'. 2
Write the C++ code for the declaration of overloaded stream insertion(>>) and stream extraction() operator for the object d  of type Date. 2 marks
What happens when an object is assigned to another object without overloading an assignment operator? 2 marks
Suppose there is a template function 'func' having argument of type U and return type T. What will be the C++ syntax to call  this function, when we pass a variable 'x' of type double and it is returning an int type? 2 marks
If the requested memory is not available in the system then what does calloc(), malloc() and new operator return? 3 marks
Which one of the given two methods is better to read from a file and Why ? 3 marks
Using stream insertion operator >>
Using get() function
Write a function named Sum which takes an integer as its argument and uses a static integer variable to keep track of the sum  of all values passed to it during the running of a program. 3 marks
Given is the code for nested classes.
class First
{
public:
class Second
{ public:
Second()
{
fValue = 20;
}
void Display();
private:
int fValue;
};
};
Write the code to define Display() member function of class inner class outside the body of outer class. The function  Display() will display the value of data member fValue of class First. 3marks
Briefly explain the logic of given code. Also determine what is the value of 'counter' variable if the code below is executed ? 5 marks
main()
{
int num = 5;
int counter=0;
while(num != 0)
{
if ( num & 01)
counter++;
num>>=1;
}
return 0;
}
Using Template (code given) have to write a function square() that takes "x" as double but return its square as integer. 5marks
One question was from the phone example in the handouts. Have to write part of missing code . 5marks
Using manipulation operator show
Virtual——–university (8 – character between them) 5 marks


Another paper..........................................................

Cs 201 Fall 2011 Final Term Feb 2012 – VU Current Paper – 03 Feb 2012
Long Question
Q1: Given is the code for a class named Coordinate.(10)
class Coordinate
{
private:
int X, Y;
public:
Coordinate()
{
X = 0;
Y = 0;
}
class Coordinate
{
friend void Displaycord();
private:
int X, Y;
public:
Coordinate()
{
X = 0;
Y = 0;
}
};
Q2: Write a program that defines a Template function named Square () which finds the square of a number and then return it.
Define one variable of type int in main function and then call Square function on that. (10)
Program output should look like this:
Enter an integer value to find its Square: 6
Square of integer number is: 36
Q3: Why is it necessary to initialize a static object as the time of creation and how it is initialized ?(5)
Q4:Transform the following If-else statement into switch statement.(5)
if (x == 5)
else if (x == 10 || x == 11)
else if (x == 8)
else if (x == 9)
else
Q5:Read the given code and explain code functionality. (3)
Matrix :: Matrix ( const Matrix & m )
{
numRows = m.numRows ;
numCols = m.numCols ;
elements = new ( double * ) [ numRows ] ;
for ( int i = 0 ; i < numRows ; i ++ )
{
elements [ i ] = new double [ numCols ] ;
for ( int j = 0 ; j < numCols ; j ++ )
elements [ i ] [ j ] = m.elements [ i ] [ j ] ;
}
}
Hint : This function belong to a matrix class, having
Number of Rows = numRows
Number of Columns = numCols
Q6: In the following code;(3)
#include <iostream.h>
#include <conio.h>
main() {
double j;
getche();
}
Is double j; an example of global variable or local variable ? Why ?
Q7: Identify and correct the error in the given code segment.(3)
main()
{
int val = 30;
int &ref = val;
&ref = &ref++;
}
Q8: Determine the output of the given program code.(2)
for (int I = 1; i<5; i++){
if ( I == 3)
continue;
cout I endl ;
}
Q9: 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");
}
Q10: How can we declare and initialize static data member of a class?(2)
Q11: When memory is allocated (snow) dynamically using new operator within the constructor of class then what is an appropriate
place to de-allocate the memory?(2)
Q11: Write down the output of the following code segment? (2)
int x[10] = {0,1, 2, 3, 4, 5, 6, 7, 8, 9};
int *xptr;
xptr = &x[5];
cout *(xptr++) + 1;
MCQ
Sequence of event(s) when allocating memory using new operator is ____________.
Assignment operator is ________ associative
To avoid dangling reference, always return _________.
Which value is returned by the destructor of a class?
The functions used for dynamic memory allocation return pointer of type ______.
The function free() returns back the allocated memory got through calloc and malloc to _____ .
At the time of linking, library functions are available in the ________form.
Which of the following is NOT a preprocessor directive?
When we define an array of objects then ___________.
A constructor will create a new object with a full copy of the other object, this type of copy is known as ___________.
When an object of a class is defined inside another class then ______________.
Every stream has _________.
_________in the following options is not a method of output stream.
To perform manipulation with input/output, we have to include ________ header file
A class whose object is contained as const object, must have ____________.
By using objects as class members, _________ is achieved
The operator function will be implemented as _____, if both objects (obj1, obj2) are passed as arguments to – operator in the
statement given below.
obj3 = obj1 – obj2;
ANSI stands for _________.
A template function must have at least _______________ generic data type.
Which of the following is true about operator overloading?
1-The operator works with only objects of the class in which it is overloaded.
2-The operator works with objects and primitive data types regardless of parameters.
3-The operator works with both objects and primitive data types depending on parameters.
4-The operator must have a constant and an object as parameters.
Operator overloading can be performed through__________________.
The pointer returned by the new operator points to ___________ of memory chunks allocated by the new operator.
The return type of the operator function for operator is __________.
What will be the output of following statement?
cout setfill('0') setw(7) 128 ;
The operator used for casting in C is standard ________ operator.
Consider the following code segment.
struct intorDouble
{
Int ival;
Double charvar;
};
main()
{
intorDouble VAZ;
int size ;
size = sizeof(VAZ);
}
What will be the value of variable size if integer occupies 4 bytes and double occupies 8 bytes?
The file-open mode __________ is used to open a file for output and move to the end of the file.
In the statement int &x = y; compiler ______.
Which header file must be included to use the functions tolower() and toupper()?
Which one of the following functions is included in stdlib.h header file?
For one byte, there are _____ combinations of values which can be stored in computer.
Which of the following statement is best regarding declaration of friend function?
Answer- It can be declared anywhere in class as these are not affected by the public and private keywords.
The operator used for dereferencing the elements of an array using a pointer is _________.
The __________ statement forces the immediate next iteration of the loop.
A function is a block of statements (code) that can be __________.
Which of the following values are used in C/C++ to represent true and false?
Ans- 1 and 0
The dynamic memory allocation uses memory from the ____________.
In C/C++, null character is represented as ________________.


Another paper....................................................

Subjective questions were mostly from past papers but objectives were mostly new but not that difficult ,well that's relative to your knowledge.
Subjective questions were
Use of new and delete operator
A short program to calculate area of circle
A program of class date with dynamic memory allocation



On Fri, Feb 17, 2012 at 12:53 AM, Bjiya <mc110203584@vu.edu.pk> wrote:


---------- Forwarded message ----------
From: Bjiya <mc110203584@vu.edu.pk>
Date: Fri, Feb 17, 2012 at 12:49 AM
Subject: CS201 current paper
To: Shahzad Sadiq <lushahz@gmail.com>


Daer Shahzad bhai 
Assalam o Alaikum 
How are u? How are ur papers going or end up? bhai can u please send me the current papers of cs201 of this month? my paper is on 18th so i can prepare with more accuracy. please if u have then send me. with a lot of thanks.
 

--




Khushiyan Naseeb sy milti hayn.......... 
but... Remember

If you do hard work
then 
Success will be in your hands...
phir sari khushiyan tumhari hayn.........



Remember me in your Prayers
Bjiya
MIT 1st Semester 




--




Khushiyan Naseeb sy milti hayn.......... 
but... Remember

If you do hard work
then 
Success will be in your hands...
phir sari khushiyan tumhari hayn.........



Remember me in your Prayers
Bjiya
MIT 1st Semester 




--













--




Khushiyan Naseeb sy milti hayn.......... 
but... Remember

If you do hard work
then 
Success will be in your hands...
phir sari khushiyan tumhari hayn.........



Remember me in your Prayers
Bjiya
MIT 1st Semester 

--
██████████████████ Basic Group Rules ███████████████████
Immoral & Rudish talk, Earning program links, Cell number for friendship purpose, Websites/Groups Links, Adult contents, Criticize-able Islamic stuff, Spreading disruption, Spamming are strictly prohibited and banned in group.
█████████████████████████████████████████████████
 
Follow these detailed Group Rules, otherwise you will be banned at any time.
https://docs.google.com/document/d/1YJxA8x3_U7C1lRc0EXfLrJpco4A1XkB1vDxOTqOd3Jg/edit?hl=en&authkey=CNDy9tkJ
 
Group Email Address:
Attock-VU-Group@Googlegroups.Com
 
Join group by sending a blank email from University ID at:
Attock-VU-Group+Subscribe@Googlegroups.Com
 
Join us at http://www.Vusr.net for Papers,Assignments,GDBs, Quizes.
 
████████████ Click here to Join this group at Facebook:████████████
♥ ♥ ♥ https://www.facebook.com/home.php?sk=group_111877855568034 ♥ ♥ ♥
█████████████████████████████████████████████████

No comments:

Post a Comment