cs201 answer required

274 views
Skip to first unread message

zeeshan mustafa

unread,
Feb 10, 2011, 12:55:26 PM2/10/11
to vuma...@googlegroups.com, vugo...@googlegroups.com, vu...@googlegroups.com, vu-and-...@googlegroups.com, vu-a...@googlegroups.com

_______ operators are the ones that require two operands on both sides of the operator.

Double

Two sided

Binary

None of the given options

Mehreen Humayun

unread,
Feb 10, 2011, 1:11:12 PM2/10/11
to vu...@googlegroups.com
Binary

Ref: Some operators require two operands they are called binary operators
________________
Mehreen Humayun
3rd Semester,MBA(Banking)
Distance Learning Student, 
Virtual University of Pakistan





--
--
Please visit www.vuzs.net For Current & Old Papers, Quizzes, Assignments and study material.
--
You received this message because you are subscribed to the Google
Groups "vuZs" group.
--
To post a new message on this group, send email to vu...@googlegroups.com
--
Message Posting Rules: http://groups.google.com/group/vuZs/web/vuzs-basic-rules-for-posting-messages
--
To unsubscribe from this group, send email to vuZs+uns...@googlegroups.com
--
For more info, visit the main page of vuZs group at http://groups.google.com/group/vuZs
--
To join this group Send blank email from your virtual university email address to
vuZs+su...@googlegroups.com
or visit
http://groups.google.com/group/vuZs/subscribe?hl=en

Muhammad Ishfaq

unread,
Feb 10, 2011, 1:20:44 PM2/10/11
to vuzs

@ Zeeshan Bhai
Dear if you have more queries , plz share.




Best Wishes,

Muhammad Ishfaq
Virtual University of Pakistan
Masters in Computer Science
Semester-01
قل رب زدنی علما
gmail: pak....@gmail.com



--

zeeshan mustafa

unread,
Feb 10, 2011, 1:51:47 PM2/10/11
to vu...@googlegroups.com, vu-and-...@googlegroups.com, vu-a...@googlegroups.com, vugo...@googlegroups.com, vuma...@googlegroups.com, virtaul-...@googlegroups.com

Once we have defined a symbolic constant value using #define, that value _________during program execution

Can be changed

Cannot be changed

Varies

Become zero

Muhammad Ishfaq

unread,
Feb 10, 2011, 1:54:58 PM2/10/11
to vu-and-company, vuzs, vu-askari, vugoogle, vumasters, virtaul-pakistan

Dear answer is Cannot be changed,
If you have more queries , plz share with us


Best Wishes,

Muhammad Ishfaq
Virtual University of Pakistan
Masters in Computer Science
Semester-01
قل رب زدنی علما
gmail: pak....@gmail.com

zeeshan mustafa

unread,
Feb 10, 2011, 2:06:04 PM2/10/11
to mc100...@vu.edu.pk, vu...@googlegroups.com
ok
now can u give answer

Look at the program code and identify the error. 1 #include 2 #define PI 3.1415926; // Defining PI 3 main() { 4 int radius = 5; 5 cout << "Area of circle with radius " << radius << " = " << PI * radius * radius; }

(a)It will be compiled successfully and will not generate

(b)It will be compiled and returns nothing

©Error exists in line number. Semi colon is not allow

(d)The value of PI cannot be defined in the beginning
 

Date: Fri, 11 Feb 2011 00:04:17 +0500
Subject: Re: )))))))Vu & Company((((((( cs201 answer required
From: mc100...@vu.edu.pk
To: zeeshan...@live.com


Dear zeeshan,
i am compiling these from past papers , and i have many past papers.



Best Wishes,

Muhammad Ishfaq
Virtual University of Pakistan
Masters in Computer Science
Semester-01
قل رب زدنی علما
gmail: pak....@gmail.com



On Fri, Feb 11, 2011 at 12:01 AM, zeeshan mustafa <zeeshan...@live.com> wrote:
The cs201 subjective will be from past papers.From where you have prepared the subjective

zeeshan mustafa

unread,
Feb 10, 2011, 2:09:09 PM2/10/11
to mc100...@vu.edu.pk, vu...@googlegroups.com, vugo...@googlegroups.com, vuma...@googlegroups.com, vu-and-...@googlegroups.com, vu-a...@googlegroups.com, virtaul-...@googlegroups.com, virtua...@googlegroups.com, virtu...@googlegroups.com, vu-ex...@googlegroups.com, vuca...@googlegroups.com
There are also some mcqs
 

An instance of a class is called ________________.

Structure

Data type

Object

Member function

 

 

 

If you create a header file of your own and you save it in the “Headerfiles” folder which is located on the current working directory then you must enclose your header file within _________

Braces

Quotation marks

#sign

Angle brackets

 

 

 

The memory allocation in C++ is carried out with the help of _______________.

NULL pointer

New operator

Dot operator

+operator

 

A reference cannot be _____________.
1

Zero

NULL

Integer

 

The object code of our program is combined with the _______________

Source program

Machine code of the operating system

Object code of the library functions

With header files

 

A pointer with value NULL is defined in the header files _____________and ___________.

Conio.h, iostream.h

Conio.c ,getche ()

Stdlib.h ,stddef.h

Process.h, stdi.h

 

new operator can be used for ______________.

Only integer data type

Only char and integer data types

Integer,float,char and double data types

Dot operator

 

The function calloc takes two arguments, first argument is the ______________ and the second argument is the ____________.

Required space in terms of numbers, size of space

Size of space,number of bytes

Space in term of string character,size of list

Size of array ,number of bytes

 

free function is available in _______________ header file.

Conio.h

Iostream.h

String.h

Stdlib.h

 

 

Care must be taken about the correct ______________ of operator while overloading.

Semantic

Complexity

Both semantic and complexity

None of the given options

 

While using _________________ operator we do not need to supply number of bytes allocated.

Insertion

Dot

Malloc

New

 

Once the _______________ are created, they exist for the life time of the program

Local variables

Non static variables

Static variables

Automatic variables

 

Operator overloading is to allow the same operator to be bound to more than one implementation, depending on the types of the _________.

Compilers

Operands

Function names

Applications

 

The friend functions are _____________.

Not member of a class

Member of a class

Inline functions

Void functions



Date: Fri, 11 Feb 2011 00:04:17 +0500
Subject: Re: )))))))Vu & Company((((((( cs201 answer required
From: mc100...@vu.edu.pk
To: zeeshan...@live.com

Dear zeeshan,
i am compiling these from past papers , and i have many past papers.



Best Wishes,

Muhammad Ishfaq
Virtual University of Pakistan
Masters in Computer Science
Semester-01
قل رب زدنی علما
gmail: pak....@gmail.com

Muhammad Ishfaq

unread,
Feb 10, 2011, 2:13:46 PM2/10/11
to zeeshan mustafa, vuzs

Dear answer is  2 #define PI 3.1415926; // Defining PI 3
correct option  is C.
we have also not included any header file (iostream)

Look at the program code and identify the error.

1 #include

2 #define PI 3.1415926; // Defining PI 3

main() {

4 int radius = 5;

5 cout << "Area of circle with radius " << radius << " = " << PI * radius * radius; }

(a)It will be compiled successfully and will not generate

(b)It will be compiled and returns nothing

©Error exists in line number. Semi colon is not allow

(d)The value of PI cannot be defined in the beginning



Best Wishes,

Muhammad Ishfaq
Virtual University of Pakistan
Masters in Computer Science
Semester-01
قل رب زدنی علما
gmail: pak....@gmail.com

Muhammad Ishfaq

unread,
Feb 10, 2011, 2:12:26 PM2/10/11
to zeeshan mustafa, vuzs

Dear answer is  there is an error in 2 #define PI 3.1415926; // Defining PI 3
option C is correct in the list.

we have also not included any header file (iostream)

Look at the program code and identify the error.

1 #include

2 #define PI 3.1415926; // Defining PI 3

main() {

4 int radius = 5;

5 cout << "Area of circle with radius " << radius << " = " << PI * radius * radius; }

(a)It will be compiled successfully and will not generate

(b)It will be compiled and returns nothing

©Error exists in line number. Semi colon is not allow

(d)The value of PI cannot be defined in the beginning



Best Wishes,

Muhammad Ishfaq
Virtual University of Pakistan
Masters in Computer Science
Semester-01
قل رب زدنی علما
gmail: pak....@gmail.com

zeeshan mustafa

unread,
Feb 10, 2011, 1:49:23 PM2/10/11
to vu...@googlegroups.com, vugo...@googlegroups.com, vu-and-...@googlegroups.com, vu-a...@googlegroups.com, vuma...@googlegroups.com
i don't what subjective to prepared for cs201 paper.is MCQS would be sufficient to be passed as there would be 27 mcqs and 37 marks subjective(i have not prepared).can you tell how to prepare

zeeshan mustafa

unread,
Feb 10, 2011, 2:12:16 PM2/10/11
to vu...@googlegroups.com, mc100...@vu.edu.pk, virtua...@googlegroups.com, virtu...@googlegroups.com, vu-ex...@googlegroups.com, vu-and-...@googlegroups.com, vu-a...@googlegroups.com, vuca...@googlegroups.com, vugo...@googlegroups.com

 yes here are all quizzes

Date: Thu, 10 Feb 2011 23:20:44 +0500
Subject: Re: [vuZs] cs201 answer required
From: mc100...@vu.edu.pk
To: vu...@googlegroups.com
quiz.rar

zeeshan mustafa

unread,
Feb 10, 2011, 2:19:59 PM2/10/11
to vu...@googlegroups.com, mc100...@vu.edu.pk
what queries you mean question

 

Date: Thu, 10 Feb 2011 23:20:44 +0500
Subject: Re: [vuZs] cs201 answer required
From: mc100...@vu.edu.pk
To: vu...@googlegroups.com

zeeshan mustafa

unread,
Feb 10, 2011, 2:22:51 PM2/10/11
to vu...@googlegroups.com, vu-and-...@googlegroups.com, mc100...@vu.edu.pk, vu-a...@googlegroups.com, vugo...@googlegroups.com, vuma...@googlegroups.com, virtaul-...@googlegroups.com

 

What will be the output of the given code? #include #define MAX( A, B ) ((A) > (B) ? (A) : (B)) void main() { int i, x, y; x = 23; y = 45; i = MAX( x++, y++ ); // Side-effect: // larger value incremented twice cout << "x = " << x << " y = " << y << '\n'; }

X=23 y=45

X=24 y=46

X=24 y=47

X=22 y=47


 

Date: Thu, 10 Feb 2011 23:54:58 +0500
Subject: [vuZs] Re: )))))))Vu & Company((((((( cs201 answer required
From: mc100...@vu.edu.pk
To: vu-and-...@googlegroups.com
CC: vu...@googlegroups.com; vu-a...@googlegroups.com; vugo...@googlegroups.com; vuma...@googlegroups.com; virtaul-...@googlegroups.com

zeeshan mustafa

unread,
Feb 10, 2011, 2:26:57 PM2/10/11
to vu...@googlegroups.com, vu-and-...@googlegroups.com, virtaul-...@googlegroups.com, vugo...@googlegroups.com, vuma...@googlegroups.com

The function overloading requires__________________.

No arguments

The argument list to be the same

The arguments of integer type only

The argument list to be different

zeeshan mustafa

unread,
Feb 10, 2011, 2:25:23 PM2/10/11
to vu...@googlegroups.com, vu-and-...@googlegroups.com, mc100...@vu.edu.pk, vu-a...@googlegroups.com, vugo...@googlegroups.com, vuma...@googlegroups.com, virtaul-...@googlegroups.com

 

Windows operating system may itself takes memory from ___________.

Stack

Array

Lists

Heap


Mehreen Humayun

unread,
Feb 10, 2011, 2:30:00 PM2/10/11
to vu...@googlegroups.com

An instance of a class is called ________________.

Structure

Data type

Object

Member function


Ref: 

In reality, an object is an instance of a class



The memory allocation in C++ is carried out with the help of _______________.

NULL pointer

New operator

Dot operator

+operator


Ref: The memory allocation in C++ is carried out with the use of an operator called new. 


The object code of our program is combined with the _______________

Source program

Machine code of the operating system

Object code of the library functions

With header files


Ref: The object code of our program is combined with the object code of the library functions, which the program is using. 



________________
Mehreen Humayun
3rd Semester,MBA(Banking)
Distance Learning Student, 
Virtual University of Pakistan





zeeshan mustafa

unread,
Feb 10, 2011, 2:33:37 PM2/10/11
to vu...@googlegroups.com, vu-and-...@googlegroups.com, vugo...@googlegroups.com, vuma...@googlegroups.com, virtaul-...@googlegroups.com, virtua...@googlegroups.com, vu-a...@googlegroups.com, virtu...@googlegroups.com

Is this answer is right according to handouts see the attach file

 

Symbolic constant PI can be defined as:

#define PI 3.14;

#define PI 3.14

#define PI =3.14

#include pi=3.14

untitled.rar

Mehreen Humayun

unread,
Feb 10, 2011, 2:39:47 PM2/10/11
to vu...@googlegroups.com

The friend functions are _____________.

Not member of a class

Member of a class

Inline functions

Void functions


Ref:  Friend functions are not considered class members; they are normal external functions that are given special access privileges.



A reference cannot be _____________.
1

Zero

NULL

Integer



Ref: 

Reference cannot be null it has to point a data type.



new operator can be used for ______________.

Only integer data type

Only char and integer data types

Integer,float,char and double data types

Dot operator


Ref: Similarly, new operator can be used for other data types like char, float and double etc.

________________
Mehreen Humayun
3rd Semester,MBA(Banking)
Distance Learning Student, 
Virtual University of Pakistan





zeeshan mustafa

unread,
Feb 10, 2011, 2:42:57 PM2/10/11
to vu...@googlegroups.com, mc090...@vu.edu.pk

 

Once the _______________ are created, they exist for the life time of the program

Local variables

Non static variables

Static variables

Automatic variables



Date: Thu, 10 Feb 2011 22:39:47 +0300

Subject: Re: [vuZs] cs201 answer required

Muhammad Ishfaq

unread,
Feb 10, 2011, 2:34:27 PM2/10/11
to vuzs

Dear answer is

The function overloading requires__________________.

No arguments

The argument list to be the same(ref page no.301)

The arguments of integer type only

The argument list to be different





Best Wishes,

Muhammad Ishfaq
Virtual University of Pakistan
Masters in Computer Science
Semester-01
قل رب زدنی علما
gmail: pak....@gmail.com

Muhammad Ishfaq

unread,
Feb 10, 2011, 2:27:38 PM2/10/11
to vu-and-company, vuzs, vugoogle, vumasters, vu-askari, virtaul-pakistan, virtualstars, virtulians, vu-experts, vucampus

Dear these are solved

An instance of a class is called ________________.

Structure

Data type

Object(classes consists of method (functions) and object)

Member function

 

 

 

If you create a header file of your own and you save it in the “Headerfiles” folder which is located on the current working directory then you must enclose your header file within _________

Braces

Quotation marks(In case of user defined header file )

#sign

Angle brackets

 

 

 

The memory allocation in C++ is carried out with the help of _______________.

NULL pointer

New operator(used for dynamic memory allocation)

Dot operator

+operator

 

A reference cannot be _____________.
1

Zero

NULL

Integer

 

The object code of our program is combined with the _______________

Source program

Machine code of the operating system

Object code of the library functions

With header files

 

A pointer with value NULL is defined in the header files _____________and ___________.

Conio.h, iostream.h(valid header files)

Conio.c ,getche ()

Stdlib.h ,stddef.h

Process.h, stdi.h

 

new operator can be used for ______________.

Only integer data type

Only char and integer data types

Integer,float,char and double data types(can be used for any native data type)

Dot operator

 

The function calloc takes two arguments, first argument is the ______________ and the second argument is the ____________.

Required space in terms of numbers, size of space(ref Book Page 281)




Best Wishes,

Muhammad Ishfaq
Virtual University of Pakistan
Masters in Computer Science
Semester-01
قل رب زدنی علما
gmail: pak....@gmail.com

sadia sheikh

unread,
Feb 10, 2011, 3:19:35 PM2/10/11
to vu...@googlegroups.com

If overloaded plus operator is implemented as non-member function then which of the following statement will be true for the statement given below?

obj3 = obj1 + obj2 ;

 

 

 

 

 

 

 

       ► obj2 will be passed as an argument to + operator  whereas obj2 will drive the + operator

 

       obj1 will drive the + operator whereas obj2 will be passed as an argument to + operator

 

       Both objects (obj1, obj2) will be passed as arguments to the + operator

 

       Any of the objects (obj1, obj2) can drive the + operator





On 11 February 2011 01:08, sadia sheikh <cutes...@gmail.com> wrote:

The region of memory, available for allocation at run time in C language is called

________ memory whereas in C++ language is called as ________________.

Heap, Stack

Stack, Free Store

Heap, Free Store

None of above

sadia sheikh

unread,
Feb 10, 2011, 3:08:48 PM2/10/11
to vu...@googlegroups.com

The region of memory, available for allocation at run time in C language is called

________ memory whereas in C++ language is called as ________________.

Heap, Stack

Stack, Free Store

Heap, Free Store

None of above

On 11 February 2011 00:42, zeeshan mustafa <zeeshan...@live.com> wrote:

zeeshan mustafa

unread,
Feb 11, 2011, 12:01:22 AM2/11/11
to vu...@googlegroups.com, vu-and-...@googlegroups.com, mc100...@vu.edu.pk, vugo...@googlegroups.com, vuma...@googlegroups.com, vu-a...@googlegroups.com, virtaul-...@googlegroups.com, virtua...@googlegroups.com, virtu...@googlegroups.com, vu-ex...@googlegroups.com, vuca...@googlegroups.com

watch attached file

 

The object code of our program is combined with the _______________

Source program

Machine code of the operating system(not this is correct|)

Object code of the library functions(this is the correct answer)

With header files
untitled.rar

zeeshan mustafa

unread,
Feb 11, 2011, 12:02:53 AM2/11/11
to vu...@googlegroups.com, vu-and-...@googlegroups.com, mc100...@vu.edu.pk, vugo...@googlegroups.com, vuma...@googlegroups.com, vu-a...@googlegroups.com, virtaul-...@googlegroups.com, virtua...@googlegroups.com, virtu...@googlegroups.com, vu-ex...@googlegroups.com, vuca...@googlegroups.com
send me the solved subjective of cs201

zeeshan mustafa

unread,
Feb 11, 2011, 12:10:59 AM2/11/11
to vu...@googlegroups.com, virtaul-...@googlegroups.com, virtua...@googlegroups.com, virtu...@googlegroups.com, vu-and-...@googlegroups.com, vu-a...@googlegroups.com, vu-ex...@googlegroups.com, vuca...@googlegroups.com, vugo...@googlegroups.com

 

#undef is used for __________.

Defining a symbol

Making a symbol undefined

Defining a macro

Defining a header file



Date: Fri, 11 Feb 2011 00:34:27 +0500

Subject: Re: [vuZs] cs201 answer required

Virtual Brain

unread,
Feb 11, 2011, 12:47:52 AM2/11/11
to vu...@googlegroups.com
On Fri, Feb 11, 2011 at 10:10 AM, zeeshan mustafa <zeeshan...@live.com> wrote:

 

#undef is used for __________.

Defining a symbol

Making a symbol undefined(pg no 289)

mc100402793 Hina

unread,
Feb 11, 2011, 4:36:39 AM2/11/11
to vu...@googlegroups.com
yes bro its true option:
#define PI 3.14
 
--

zeeshan mustafa

unread,
Feb 11, 2011, 10:47:47 AM2/11/11
to vu...@googlegroups.com, virtual...@gmail.com, virtual...@googlegroups.com, virtua...@googlegroups.com, vu-and-...@googlegroups.com, vu-a...@googlegroups.com, vuma...@googlegroups.com

Look at the statement given below int & a; and tell what will happen ?

Compiler will compile successfully

Compiler will show a warning to you

Null value will be assigned to a

Compiler will generate an error:  ‘a’ declared as reference

zeeshan mustafa

unread,
Feb 11, 2011, 10:51:25 AM2/11/11
to vu-and-...@googlegroups.com, vu-a...@googlegroups.com, vuma...@googlegroups.com, vu...@googlegroups.com

The ____________ is called automatically when an object destroys


Destructor

Constructor

Main program

Default constructor

Reply all
Reply to author
Forward
0 new messages