Showing posts with label Virtual University. Show all posts
Showing posts with label Virtual University. Show all posts

CS201 Most Important Questions for VIVA

By: // No comments:

CS201 Most Important Questions for VIVA 

Here we have for You Most important and frequently Asked Cs201 viva questions with Answer. Read them All for Good Preparation of CS201 VIVA.

You should also Read: CS201 VIVA Preparation Helping Material

What is C++?
C++ is created by Bjarne Stroustrup of AT&T Bell Labs as an extension of C, C++ is an object-oriented computer language used in the development of enterprise and commercial applications. Microsoft’s Visual C++ became the premier language of choice among developers and programmers.

What are the basic concepts of object oriented programming?
It is necessary to understand some of the concepts used extensively in object oriented programming.These include
§ Objects
§ Classes
§ Data abstraction and encapsulation
§ Inheritance
§ Polymorphism
§ Dynamic Binding
§ Message passing

Define inheritance?
The mechanism of deriving a new class (derived) from an old class (base class) is called inheritance. It allows the extension and reuse of existing code without having to rewrite the code from scratch. Inheritance is the process by which objects of one class acquire properties of objects of another class.

Define Polymorphism?

Polymorphism means one name, multiple forms. It allows us to have more than one function with the same name in a program.It allows us to have overloading of operators so that an operation can exhibit different behaviors in different instances.

What are the features of C++ different from C?
§ All the features of C are similar to C++ except some features, such as polymorphism, operator overloading which are supported in C++ but not in C language.
§ Both C and C++ language is similar in their functionality but C++ provides with more tools and options.

What is encapsulation?
The wrapping up of data and functions into a single unit (called class) is known as encapsulation. Encapsulation containing and hiding information about an object, such as internal data structures and code.

What is message passing?
An object oriented program consists of a set of objects that communicate with each other. Message passing involves specifying the name of the object, the name of the function and the information to be sent.

What are tokens in C++?
The smallest individual units of a program is known as tokens. c++ has the following tokens :
§ Keywords
§ Identifiers
§ Constants
§ Strings
§ Operators

What is the use of enumerated data type?
An enumerated data type is another user defined type which provides a way for attaching names to numbers thereby increasing comprehensibility of the code. The enum keyword automatically enumerates a list of words by assigning them values 0,1,2, and so on.

Also Read: CS201 Solved Subjective Midterm Past Paper - 2009


What is the use of default constructor?
A constructors that accepts no parameters is called the default constructor.If no user-defined constructor exists for a class A and one is needed, the compiler implicitly declares a default parameter-less constructor A::A(). This constructor is an inline public member of its class. The compiler will implicitly define A::A() when the compiler uses this constructor to create an object of type A. The constructor will have no constructor initializer and a null body.

Define Constructors?
A constructor is a member function with the same name as its class. The constructor is invoked whenever an object of its associated class is created.It is called constructor because it constructs the values of data members of the class.

How variable declaration in c++ differs that in c?
C requires all the variables to be declared at the beginning of a scope but in c++ we can declare variables anywhere in the scope. This makes the programmer easier to understand because the variables are declared in the context of their use.

Define destuctors?
§ A destructor is called for a class object when that object passes out of scope or is explicitly deleted.
§ A destructor as the name implies is used to destroy the objects that have been created by a constructors.
§ Like a constructor , the destructor is a member function whose name is the same as the class name but is preceded by a tilde.

What is a class?
A class is a collection of objects.

what is the difference between c &c++?
• C++ is an object oriented programing but C is a procedure oriented programing.
• C is super set of C++.
• C can’t support inheritance, function overloading, method overloading etc. but c++ can do this.
• In c program the main function could not return a value but in the c++ the main function should return a value.

What are the few advantages of Inline function?
§ It offers an improved macro facility.
§ By using the inline functions, the user can split a large function with many nested modules of statement blocks into many small inline functions.

Also Read: CS201 Solved Subjective Midterm Paper 2011

What is copy constructor?
Copy constructor is a constructor function with the same name as the class and used to make deep copy of objects.

What is default constructor?
A default constructor is a constructor that either has no parameters, or if it has parameters, all the parameters have default values.

What is a scope resolution operator?
The scope resolution operator permits a program to reference an identifier in the global scope that has been hidden by another identifier with the same name in the local scope.

What is the difference between Object and Instance?
§ An instance of a user-defined type is called an object. We can instantiate many objects from one class.
§ An object is an instance of a class.

What is the difference between macro and inline?
Inline follows strict parameter type checking, macros do not.
Macros are always expanded by preprocessor, whereas compiler may or may not replace the inline definitions.

How variable declaration in c++ differs that in c?
C requires all the variables to be declared at the beginning of a scope but in c++ we can declare variables anywhere in the scope. This makes the programmer easier to understand because the variables are declared in the context of their use.

What is multiple inheritance?
A class can inherit properties from more than one class which is known as multiple inheritance.

what is the use of virtual destructor in c++?
§ A destructor is automatically called when the object is destroyed.
§ A virtual destructor in C++ is used primarily to prevent resource leaks by performing a clean-up of the object.

What do you mean by reference variable in c++?
A reference variable provides an alias to a previously defined variable.
Data -type & reference-name = variable name

What is iterator class?
§ Iterator class provides an access to the class which are inside the containers(it holds a group of objects in an organized way).
§ The containers include the data structure, class and abstract data type.

What are the types of declarations in C++?
There are so many types of declaration in C++ are :
§ Variable declaration
§ Constant declaration
§ Function declaration
§ Object declaration

What are Smart pointers?
Smart pointers are almost similar to pointers with additional features such as automatic destruction of a variable when it becomes out of scope and the throwing of exceptions that ensures the proper destruction of the dynamically allocated objects.

Explain function template?
Function template provides a means to write generic functions for different data types such as integer, long, float or user defined objects.

Explain class template?
Class template provides a means to write a generic class for different types so that a class can have members based on generic types that do not need to be defined at the moment of creating the class or whose members use these generic types.

What is difference between function overloading and operator overloading?
A function is overloaded when same name is given to different function.
While overloading a function, the return type of the functions need to be the same.

Also Read: CS 201 solved midterm Past Papers Download 2015

What are the advantages of inheritance?
§ Code re-usability
§ Saves time in program development.

What is a dynamic constructor?
§ The constructor can also be used to allocate memory while creating objects.
§ Allocation of memory to objects at the time of their construction is known as dynamic construction of objects.
§ The memory is allocated with the help of the new operator.

What is the difference between an Array and a List?
The main difference between an array and a list is how they internally store the data. whereas Array is collection of homogeneous elements. List is collection of heterogeneous elements.

What is the use of ‘using’ declaration?
A using declaration makes it possible to use a name from a namespace.

What is the difference between a template class and class template?
Template class: A generic definition or a parameterized class not instantiated until the client provides the needed information. It’s jargon for plain templates.
Class template: A class template specifies how individual classes can be constructed much like the way a class specifies how individual objects can be constructed. It’s jargon for plain classes.

What is friend function?
§ The function declaration should be preceded by the keyword friend.
§ The function definitions does not use either the keyword or the scope operator ::
§ The functions that are declared with the keyword friend as friend function.
§ Thus, a friend function is an ordinary function or a member of another class.

What is a scope resolution operator?
A scope resolution operator can be used to define the member functions of a class outside the class.

What do you mean by pure virtual functions?
A pure virtual member function is a member function that the base class forces derived classes to provide. Any class containing any pure virtual function cannot be used to create object of its own type.

What is a conversion constructor?
§ A converting constructor is a single-parameter constructor that is declared without the function specifier explicit.
§ The compiler uses converting constructors to convert objects from the type of the first parameter to the type of the converting constructor’s class.

What is a container class? What are the types of container classes
§ A container class is a class that is used to hold objects in memory or external storage.
§ A container class acts as a generic holder.
§ A container class has a predefined behavior and a well known interface.
§ A container class is a supporting class whose purpose is to hide the topology used for maintaining the list of objects in memory.
§ When a container class contains a group of mixed objects, the container is called a heterogeneous container; when the container is holding a group of objects that are all the same, the container is called a homogeneous container.

What is Associative container?
Associative containers are designed to support direct access to elements using keys. They are not sequential. There are four types of associative containers :
§ Set
§ Multiset
§ Map
§ Multimap

What is an iterator?
Iterators are like pointers. They are used to access the elements of containers thus providing a link between algorithms and containers. Iterators are defined for specific containers and used as arguments to algorithms.

What are the defining traits of an object-oriented language?
The defining traits of an object-oriented language are:
§ Encapsulation
§ Inheritance
§ Polymorphism

Also Read: CS201 Latest Solved MCQs (23 to 45 Lectures)

What is this pointer?
It is a pointer that points to the current object. This can be used to access the members of the current object with the help of the arrow operator.

Name some pure object oriented languages?
§ Smalltalk
§ Java
§ Eiffel
§ Sather

What is encapsulation?
Encapsulation (or information hiding) is the process of combining data and functions into a single unit called class.

What is problem with Run-time type identification?
The run time type identification comes at a cost of performance penalty. Compiler maintains the class.

What are the differences between new and malloc?
§ New initializes the allocated memory by calling the constructor. Memory allocated with new should be released with delete.
§ Malloc allocates uninitialized memory.
§ The allocated memory has to be released with free.new automatically calls the constructor while malloc(dosen’t)

What is conversion operator?
You can define a member function of a class, called a conversion function, that converts from the type of its class to another specified type.

What do you mean by implicit conversion?
§ Whenever data types are mixed in an expression then c++ performs the conversion automatically.
§ Here smaller type is converted to wider type.
§ Example : in case of integer and float integer is converted into float type.

What are virtual functions?
§ The virtual functions must be members of some class.
§ They cannot be static members.
§ They are accessed by using object pointers.
§ A virtual function can be a friend of another class.

What is the main purpose of overloading operators?
§ The main purpose of operator overloading is to minimize the chances of occurrence of errors in a class that is using the overload operators.
§ It also helps in redefining the functionalities of the operators to improve their performance.
§ Operator overloading also makes the program clearer, readable and more understandable by using common operators, such as +, =, and [].

What is a friend?
Friends can be either functions or other classes. The class grants friends unlimited access privileges.

What is stack unwinding?
Stack unwinding is a process in which a destructor is invoked in a particular program for destroying all the local objects in the stack between throwing and catching of an exception.

What is the form of assignment statement?
Variable = expression ( or constant )

What is the main purpose of overloading operators?
The main purpose of operator overloading is to minimize the chances of occurrence of errors in a class that is using the overloaded operators.

Also Read: Write ALLAH Using C++ Program

What is this pointer?
When a member function is invoked, the invoking objects pointer is passed implicitly as an argument. This pointer is called this pointer.

What is scope resolution operator?
The Scope resolution operator(: can be used to define the member functions of a program outside the boundary of a class and not within the class specifier.

What are static members and static functions?
Static members are
§ Created and initialized only once.
§ Shared among all the class objects.
Static functions are
§ Similar to the static variables and are associated with the class.
§ Can only access static variables of a class.
§ Can also be called using the scope resolution operator.

What are the components of a class?
A class consists of two components,
§ Data members
§ Methods

What is the advantage of using templates?
• Templates provide a means to write generic functions and classes for different data types.
• Templates are sometimes called parameterized types.
• Templates can significantly reduce source code size and increase code flexibility without reducing type safety.

Can a function overloading depend only on passing by value and passing by reference?
No, the reason is that whether a function is called the passing a parameter as a value or by reference, it appears similar to the caller of the function.

Is it possible to use a new for the reallocation of pointers?
The reallocation of pointers cannot be done by using new. It can be done by using the realloc() operator.

What are data members?
Data members are variables of any type(in-built or user defined).

What are the types of statements in c++?
A program in any language basically consists of statements. Statements symbolize instructions. There are many categories of statements.
§ Expression statement
§ Assignment statement
§ Selection statement
§ Iteration statement
§ Jump statement

What is initialization?
Initialization is a process of assigning a value to a variable at the time of declaration.

Also Read: cs201 final term solved paper mega File

Explain copy constructor?
A copy constructor is a special type of constructor which initializes all the data members of the newly created object by copying the contents of an existing object. The compiler provides a default copy constructor.
Class_name new _ object ( existing object);

What are the advantages of operator overloading?
Operator overloading is used to provide some extra features, behaviors and abilities to the users of a particular class. This feature in C++ helps in controlling the functions performed by an operator and reduces the chance of occurrence of errors in a program.

What is a dangling pointer?
When the location of the deallocated memory is pointed by the pointer even after the deletion or allocation of objects is done, without the modification in the value of the pointer, then this type of pointer is called a dangling pointer.

What is the difference between prefix and postfix versions of operator++()?
§ The prefix and postfix versions of operator ++() can be differentiated on the basis of arguments defined.
§ The postfix operator ++() consists of a dummy parameter of int datatype; whereas, a dummy parameter is not found in the prefix operator ++().

Can a static member function access member variable of an object?
No, because to access the member variable of an object inside its member function, this pointer is required. Since static functions are class functions, this pointer will not be passed as its arguments.

What is the advantages of using the Inline function?
§ An inline keyword before a function suggests the compiler to insert the complete body of the function wherever that function is invoked.
§ Inline expansion is typically used to eliminate the inherent cost involved in calling a function.
§ It is typically used for functions that need quick execution.

What are all the operators that cannot be overloaded?
§ Direct member access operator
§ De–reference pointer to class member operator.*
§ Scope resolution operator::
§ Conditional operator ?:
§ Sizeof operator sizeof

Can a function be overloaded based on return types?
Function signature does not depend on the return type. So overloading cannot be resolved by the return type alone.

What do you mean by a public member?
• A member declared as public is a public member.
• It can be accessed freely in a program.

Is recursion allowed in inline functions?
The recursion is allowed in inline function but practically, the inline functions and their properties do not remain inside the program. Moreover, the compiler is not sure about the depth of the recursion at the time of compilation.

What is virtual function?
A virtual function is a member function that is declared within a base class and redefined by a derived class .To create a virtual function, the function declaration in the base class is preceded by the keyword virtual.


How can a struct in C++ differs from a struct in C?

The differences between struct in C++ and C are listed in the following points:
• In C, the concept of inheritance is not supported. In C++, the concept of inheritance is fully supported.
• On declaring a struct in C, the addition of the struct keyword is must. On the contrary, there is no need of the struct keyword on declaring struct in C++.
• In C, the initialization cannot be done outside the scope of a structure. However, in C++, the initialization can be done outside the scope of a structure.
• In C, structures do not have direct functions or methods.

Also Read: Cs201 All Past Papers at one place

How the keyword struct is different from the keyword class in C++?
In C++, a class is similar to a struct with the exception that, by default, all the members of a class are private; while the members of a struct are public. Encapsulation is not supported by structures but supported by classes.

Define pure virtual function?
Pure virtual function is defined as a virtual function in a base class. It is implemented in a derived class. A program may not declare an instance of a class that has a pure virtual function.

Define a conversion constructor?
A conversion constructor is a single argument constructor. It is used by the compiler to convert a type of objects as an argument to a class type.


What is a default constructor?
A zero argument constructor or a constructor in which all the arguments have default values is called a default constructor.

What is difference between template and macro?
A template can be used to create a family of classes or function.A template describes a set of related classes or set of related functions in which a list of parameters in the declaration describe how the members of the set vary.
Identifiers that represent statements or expressions are called macros.

What is reference?
Reference is a name that acts as an alias, or alternative name, for a previously defined variable or an object.

What are the access specifier in c++?
There are three types of access specifier in c++ . They are
§ Public
§ protected
§ private

What is difference between C++ and Java?
§ C++ has pointers Java does not.
§ Java is the platform independent as it works on any type of operating systems.
§ java has no pointers where c ++ has pointers.
§ Java has garbage collection C++ does not.

What is namespace?
The C++ language provides a single global namespace. Namespaces allow to group entities like classes, objects and functions under a name.

What is an explicit constructor?
A conversion constructor declared with the explicit keyword. The compiler does not use an explicit constructor to implement an implied conversion of types. It’s purpose is reserved explicitly for construction.Explicit constructors are simply constructors that cannot take part in an implicit conversion.

What is the use of storage class specifiers?
A storage class specifier is used to refine the declaration of a variable, a function, and parameters. The following are storage class specifiers :
§ auto
§ register
§ static
§ extern

what is the assignment operator in c++ and what is its function?
Equal sign '=' is the assignment operator in C++. Default assignment operator handles assigning one object to another of the same class. Member to member copy (shallow copy).

Can destructor be private?
Yes destructors can be private. But it is not advisable to have destructors as private.

What is strstream?
string-stream provides an interface to manipulate strings as if they were input/output streams.
‹strstream› to define several classes that support iostreams operations on sequences stored in an allocated array of char object.

What is the difference between method overloading and method overriding?
Overloading a method (or function) in C++ is the ability for functions of the same name to be defined as long as these methods have different signatures (different set of parameters).
Method overriding is the ability of the inherited class rewriting the virtual method of the base class.

What is STL? And what are the components of STL?
A collection of generic classes and functions is called as Standard Template Library (STL). STL components are
• Containers
• Algorithm
• Iterators

You Can Also Download Cs201 Solved Final Term Papers, CS201 
Short Notes, CS201 Assignment Solutions, CS201 Lecture Wise Questions Answers Files, CS201 Solved MCQs, CS201 Solved Quiz , CS201 Solved Final Term Subjective Papers , CS201 Solved Final Term Objective Papers from Virtual Study Solutions For Preparation of Final Term Papers.

MTH101 Final Papers All in one Mega File

By: // No comments:

MTH101 Final Papers All in one Mega File

Here You Can Download MTH101 Solved Final Term Papers, MTH101 Short Notes , MTH101 Assignment Solutions, MTH101 Lecture Wise Questions Answers Files, Solved MCQs, MTH101 Solved Quiz , MTH101 Solved Final Term Subjective Papers , MTH101 Solved Final Term Objective Papers from Virtual Study Solutions For Preparation of Final Term Papers.

Also Read: CS201 VIVA Preparation Helping Material Also Read: ENG101 Assignment No 03 Solution 2017

MTH101 Final Term Solved Paper-1.pdf



MTH101 Final Term Solved Paper-2.pdf



Also Read: MTH101 GDB No. 2 Solution / Discussion - 2017


MTH101 Final Term Solved Paper-3.pdf



MTH101 Final Term Solved Paper-4.pdf


MTH101 Final Term Solved Paper-5.pdf

CS201 VIVA Preparation Helping Material

By: // No comments:

CS201 VIVA Preparation

Here You can Download Some Definitions and Helping material for CS201 VIVA Preparation for semester Fall 2016.

Also Read : CS201 Latest Solved MCQs For Final Term Papers

CS201 Some Definitions and Helping material for Viva

1. What is a program?
A program is a precise sequence of steps to solve a particular problem.

2. What is a class?
We write a C++ program using data members, and functions. We call this program “class”. 


3. What are data members?
The data members, functions and nested classes are called class members.

4. What is class layout?
The way in which data class members are arranged in a class object is called class layout.

5. What is class template?
A template is used for generating class types.

6. What is comment in Programing language?
Comments are used to explain the functioning of the programs. It helps to understand the code. C style of commenting is /*……..*/ also used in C++. And new line oriented C++ style is //………

7. What is a constructor?
A constructor initializes the data member of an object in the scope. It has no return type, and has the same name as class. We use many types of constructor by overloading them. 


Types of constructor:

  • Default constructor/compiler generated constructor 
  • Simple constructor (takes no arguments) 
  • Parameterized constructor (takes arguments) 
  • Constructor overloading 
  • Copy constructor 
8. What is destructor?
A function called when a class object goes out of scope. It cleans up the object, freeing resources like dynamic storage. The name of the destructor is the same as that of a class with preceding tilde sign (~). It could not be overloaded. It has no return type, and takes no argument.

9. Define #include?
The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with <…..> if the file is a system provided file, or in quotes “….” if the file is user provided.

10.For which purpose we use cout?
If we want to print something on the screen we use cout (Output stream) for this purpose.

CS201 Helping Material for Viva Preparation

CS201 LATEST SOLVED MCQS ATTACHMENTS# 1:

CS201-finalterm solved mcqs with ref. by Moaaz and Asad.pdf, 2.3 MB

CS201 LATEST SOLVED MCQS ATTACHMENTS# 2:

CS201-2008_solved.doc, 79 KB
CS201 2010.doc, 81 KB
CS201 - Final Term Papers 03.pdf, 91 KB

CS201 LATEST SOLVED MCQS ATTACHMENTS# 3:

CS201 - Final Term Papers 08.pdf, 101 KB
CS201 - Final Term Papers 09.pdf, 119 KB
CS201 - Final Term Papers 12.pdf, 116 KB

CS201 LATEST SOLVED MCQS ATTACHMENTS# 4:

CS201 - Subjective Questions 02.pdf, 61 KB
CS201 curent subjective solved.pdf, 219 KB

CS201 LATEST SOLVED MCQS ATTACHMENTS# 5:

MTH101 GDB No. 2 Solution / Discussion - 2017

By: // No comments:

MTH101 GDB No. 2 Fall 2016

Here you can get Solution of MTH101 GDB No. 2 . Semester Fall 2016. Last Date: Thursday, Feb. 09, 2017.

Also Read: MTH101 short notes or past paper

You Can Also Download MTH101 Solved Final Term Papers, MTH101 Short Notes, MTH101 Assignment Solutions, Lecture Wise Questions Answers Files, MTH101 GDB Solution, Solved Quiz , Solved Final Term Subjective Papers , Solved Final Term Objective Papers from Virtual Study Solutions For Preparation of Final Term Papers.

Also Read: MTH101 Calculus And Analytical Geometry Short Notes

MTH101 GDB No. 2 Deadline

Starting Date: Thursday, Feb. 02, 2017
Closing Date: Thursday, Feb. 09, 2017 at 11:59 P.M.

MTH101 GDB No. 2 Important Notes:

  • Post your solution of GDB only on GDB interface of LMS.
  • Do not post the solution of GDB on ‘regular MDB’ forum. It will not be graded on MDB.
  • There is preview option available on GDB forum. So, see the preview of your solution before posting your GDB solution.
  • Once GDB is posted, it cannot be edited or re-submitted.
  • In case, you see boxes instead of your solution in your GDB interface then email your GDB solution at mth101@vu.edu.pk before or on due date.
Also Read: Mega File Final Term Papers of CS101-PAK301-SL201

MTH101 GDB No. 2 Helping material

The following will be helpful to you for inserting mathematical equations in GDB interface:
  1. Please click Guideline for posting solution on GDB interface.
  2. Click Here to see the video tutorial “How to write in mathtype and post on GDB”.
  3. Visit http://www.numberempire.com/texequationeditor/equationeditor.php 

MTH101 GDB Question:

Find the volume of the solid generated when the region between the graphs of h(y)=3+y2

image:

and w(y)=2−y2

image:

over the interval [0,1]

image:

is revolved about the y-axis.

MTH 101 GDB No. 2 Solution

You can use this to plot graphs:

CS301 Assignment no 3 Solution Fall 2016

By: // No comments:

CS301 Assignment no 3 Fall 2016

Here we have CS301- Data Structures Assignment  No. 3 Solution and discussion, Fall 2016, Total Marks: 15, Due Date: 20/01/2017.

You Can Also Download CS301 Solved Final Term Papers, CS301 Short Notes, CS301 Assignment Solutions, Lecture Wise Questions Answers Files, Solved MCQs, Solved Quiz ,CS301 Solved Final Term Subjective Papers ,CS301 Solved Final Term Objective Papers from Virtual Study Solutions For Preparation of Final Term Papers.

Also Read: CS302 Short Notes for Final term Preparation

CS301 Assignment  Instructions

Please read the following instructions carefully before solving & submitting assignment:
It should be clear that your assignment will not get any credit (zero marks) if:
  • The assignment is submitted after due date.
  • The submitted assignment is other than Ms Word 2003 file.
  • The submitted assignment does NOT open or file is corrupted.
  • The assignment is copied (from other student or ditto copy from handouts or internet).
Also Read: Write ALLAH Using C++ Program

CS301 Assignment Uploading instructions

For clarity and simplicity, You are required to Upload/Submit only Ms Word file (.doc or docx format).

Note: Use ONLY Microsoft Word

CS301 Assignment Objective

The objective of this assignment is,

To make you familiar with concept of Huffman Encoding.

For any query about the assignment, contact at cs301@vu.edu.pk

CS301 Assignment Statement:

Question 1: [Marks 15]

While transmission through network, it is always important to keep data transmission rate high so data over the network can be increased using two ways; either increases the bandwidth of communication channel or decrease the size of data (compression) to increase the bandwidth utilization.

Lossless data compression algorithms are important in network and Huffman encoding scheme can be used for lossless data compression. Suppose the following string is being transmitted over the network:

“Data Compression in data structure”

We cannot increase the bandwidth of communication channel. Instead we have to compress the given string. Use Huffman encoding scheme to encode the given string.

To encode the string:

Build a table containing the following information about the string.

Build Huffman encoding tree. The tree will be built with the help of characters and their respective frequencies which you will find in step 1.

Calculate how much bits are consumed by original and compressed string. What percentage of bits is saved by Huffman encoding scheme?

Mention step by step construction of Huffman Encoding tree from the above table.

Also ReadHOW TO TAKE QUIZ ON LMS

CS301 Assignment no 3 Solution

  • Please Wait.
  • Assignment Solution of CS301 will be updated Soon.
If You want to receive the Solution directly in your inbox. Please Subscribe below or like us on Facebook.

CS302 Short Notes for Final term Preparation

By: // No comments:

CS302 Short Notes for Final term

Question: How can a D flip-flop can be made to toggle? 
Answer: A D flip-flop can be made to toggle by connecting Q' to D. 

Question: What is the difference between a counter and shift register ?
 Answer: A counter has a specified sequence of states, but a shift register does not.

Also Read: CS101 Final Term Past Paper Collection - 1
Question: How many outputs and inputs GAL22V10 have? 
Answer: The GAL22V10 has 22 inputs and 10 outputs. 

Question: What is an equivalent representation for the Boolean expression A' + 1 ? 
Answer: From the Boolean property A + 1 = 1, let A = A'.

Also Read: CS201 Latest Solved MCQs For Final Term Papers
Question: What is K-map and why we used it? 
Answer: A Karnaugh map provides a pictorial method of grouping together expressions with common factors and therefore eliminating unwanted variables. The Karnaugh map can also be described as a special arrangement of a truth  table. 

Question: Each stage in a shift register represents how much storage capacity? 
Answer: one bit 

Also Read: Write ALLAH Using C++ Program
Question: what are PLD's?How are the classified. 
Answer: The programmable logic devices (PLD's) are used in a lot of applications, and replace SSI and MSI circuits, due the space saving and reduce the number of devices in a certain design. 
A PLD is made of a matrix of AND and OR gates, that can be programmed to obtain certain logic functions. There are four types of devices that can be clasified as PLD's: 
a)The Programmable Read-Only Memory, PROM. 
b)The Programmable Logic Array , PLA. 
c)The Programmable Array Logic, PAL. 
d)The Generic Array Logic, GAL. 

Question: What are Flip-flops? 
Answer: The memory elements in a sequential circuit are called flip-flops. A flip-flop circuit has two outputs, one for the normal value and one for the complement value of the stored bit.

Also Read: CS402 Assignment no. 3 Solution Fall 2016
Question: If an S-R latch has a 0 on the S input and a 1 on the R input and then the R input goes to 0, then what the latch will be? 
Answer: The latch wil be in reset condition. 

CS304 Assignment no 3 Solution Fall 2016

By: // No comments:

CS304 Assignment no 3 Fall 2016

Here we have CS304 - Object Oriented Programming Assignment No. 03 Solution and Discussion Fall 2016 , Total Marks: 20, Due Date: 13th Jan, 2017.

You Can Also Download CS304 Solved Final Term Papers, Short Notes, Assignment Solutions, Lecture Wise Questions Answers Files, CS304 Solved MCQs, Solved Quiz ,CS304 Solved Final Term Subjective Papers ,CS304 Solved Final Term Objective Papers from Virtual Study Solutions For Preparation of Final Term Papers.


Also Read: CS402 Assignment no. 3 Solution Fall 2016

CS304 Assignment Objectives:

To get a hands on experience in implementing member initialization list, Inheritance and overriding functions in Object oriented Programming

Also Read: CS601 Assignment no 3 Fall 2016

CS304 Assignment Instructions:

Please read the following instructions carefully before submitting assignment:
It should be clear that your assignment will not get any credit if:

  • The assignment is submitted after due date.
  • The assignment is submitted via email.
  • The assignment is copied from Internet or from any other student.
  • The submitted assignment does not open or file is corrupt.
  • It is in some format other than .cpp (Code File).

Note: All types of plagiarism are strictly prohibited.
For any query about the assignment, contact at CS304@vu.edu.pk

CS304 Assignment Problem Statement:

Consider the following part of class diagram in continuation of previous assignments.
Class Diagram
The distance from the sun for all the planets is calculated as the distance from the Earth to the Sun (the AU), where AU is the unit of distance and 1 AU = 150,000,000 km
Following table shows distance of planets from the Sun in AU.
Planet Distance from the sun
Mercury 0.38 AU
Venus 0.723 AU
Earth 1.000 AU
Mars 1.524 AU
Jupiter 5.204 AU
Saturn 9.582 AU

Distance of planet from sun in Kilometer (KM) can be calculated by multiplying distance with the value of AU. For example, If you want to calculate the distance of earth from sun in KM then;
Distance = 1*150,000,00 = 150,000,000

Also Read: CS101 Assignment no 3 Solution Fall 2016

Tasks you have to do:

1. Keeping in view the above given class diagram and scenario, you have to write code for the below mentioned classes and implement their relationship with each other.
2. As Cal_Distance() function will implement the same formula for all inner and outer planets, so you are required to implement this function in Planet class only.
3. You are also required to calculate the distance of Mercury from Sun in Kilometers.
4. 1. Class Planet:

Attribute:
Name: string
Radius: double
Distance: double
Methods/Operations/Getters/Setters:
Print: void
Cal_Distance: double
2. Class Inner_Planet:
Methods/Operations/Getters/Setters:
Print: void
Cal_Distance: double
3. Class Mercury:
Methods/Operations/Getters/Setters:
Print: void
Cal_Distance: double

Also Read: All Subjects Final term Papers

Important points:
• Your program should be able to create an object for Mercury class having a Name, Radius and Distance without creating an explicit object of Planet class.
• All Planet attributes should be directly accessible to Inner_Planet and Mercury and should not be accessible publically.
• Definition of both functions, Print() and Cal_Distance(), should be included in Planet class. Override these functions in Inner_Planet and Mercury classes.
• Display the values of attributes and calculated distance as shown in sample output.

Also Read: CS101 Final Term Past Paper Collection - 1

CS304 Assignment Note:

1. Radius of Mercury is 2440 KM.
2. Use Member Initialization list where needed.
3. You main function should look like this;

CS304 Assignment no 3 Solution Fall 2016


CS304 Assignment no 3 Solution

Here is the Complete Solution file of CS304 Assignment no 3 of fall 2016. Click on the link below to Download the solution file.

CS304_Assignment_3_Solution.cpp 2 KB

CS101 Assignment no 3 Solution Fall 2016

By: // No comments:

CS101 Assignment no 3 Fall 2016

Here we have CS101 Assignment No. 03 (Graded) and its Solution for Fall 2016, Due Date of CS101 Assignment is 17/01/2017 with Total Marks of 20.

CS101 Assignment no 3

CS101- Introduction to Computing
Total Marks: 20
Due Date: 17/01/2017 

You Can Also Download CS101 Solved Final Term Papers, CS101 Short Notes, CS101 Assignment Solutions, Lecture Wise Questions Answers Files, Solved MCQs, Solved Quiz , CS101 Solved Final Term Subjective Papers ,CS101 Solved Final Term Objective Papers from Virtual Study Solutions For Preparation of Final Term Papers.

Aslo Read: CS101 Introduction to Computing Final term Papers

CS101 Assignment Instructions

Please read the following instructions carefully before solving & submitting assignment:

It should be clear that your assignment will not get any credit (zero marks) if:
  • The assignment is submitted after due date.
  • The submitted assignment is other than Excel file.
  • The submitted assignment does NOT open or file is corrupted.
  • The assignment is copied (from other student or ditto copy from handouts or internet).
Also Read: CS201 Solved Final Term Past Papers Collection

CS101 Assignment Uploading instructions

For clarity and simplicity, you are required to Upload/Submit only Excel file.

CS101 Assignment Objective

The objective of this assignment is:
  • To understand the basics of Microsoft Excel
  • Enable students to apply different formulas in the MS Excel
For any query about the assignment, contact at cs101@vu.edu.pk

CS101 Assignment Note:

No assignment will be accepted after the due date via email in any case (whether it is the case of load shedding or internet malfunctioning etc.). Hence refrain from uploading assignment in the last hour of deadline. It is recommended to upload solution file at least two days before its closing date.

Aslo Read: CS101 Latest Final Term Paper

CS101 Assignment

Suppose you are working as a data analyst in ABC organization. The following data is provided in the Excel file:

CS101 Assignment no 3 Solution

Here is the Complete CS101 Assignment 3 solution for fall 2016. You can download Solution file in Excel format from the Link below.

HEC Launched New Education Testing Service From Spring 2017

By: // No comments:

HEC - New Education Testing Service

Dear Students, HEC has Launched New Education Testing Service For Admissions, Scholarships From Spring 2017 . Now say , Bye to NTS - HEC Launched Education Testing Service For Admissions, Scholarships From Spring 2017.

Also Read: Distribution of Laptops to Students - Rules and Merit Criteria

New Testing Service For Admissions, Scholarships

According to Daily Times, Higher Education Commission (HEC) has warned all the Pakistani recognized universities not to approach the NTS for conducting tests for admissions and scholarships.

The universities have been asked to conduct the Education Testing Service (ETC)for conducting tests for admissions and student scholarships.

ETC (Education Testing Service) is a testing service launched by the HEC and will be functioning from next year – 2017. 

Also Read: Virtual University of Pakistan Jobs - 21/12/2016

Most important part is, there will be no fees to pay for appearing in the tests.

The service will be introduced to facilitate students as it will be free of cost whereas NTS charges a fee from the students to appear in tests. This would be a great motivation for all students

Initially the council would conduct the test for undergraduate students and later for MS and PhD admissions as well”, Dr.Ahmed.

HEC Launched New Education Testing Service From Spring 2017
HEC  New Education Testing Service
You Can Also Download Solved Mid Term Papers, Short Notes, Assignment Solutions, Lecture Wise Questions Answers Files, Solved MCQs, Solved Quiz , Solved Mid Term Subjective Papers , Solved Mid Term Objective Papers From Virtual Study Solutions For Preparation of Mid Term/Final Term Papers.

Eligibility Criteria For PM National Laptop Scheme (Phase-III)

By: // No comments:

Eligibility Criteria For PM Laptop Scheme 

Here is the Eligibility Criteria For PM National Laptop Scheme (Phase-III)-Ongoing Scheme.

Those students will be considered as Eligible who has enrolled till June 30, 2016 but not earlier than their respective program duration as per the table below:

Also Read: PM Laptop Scheme For Virtual University Students 2016-17

Eligibility Criteria For PM National Laptop Scheme
Eligibility Criteria For PM Laptop Scheme

PM National Laptop Scheme Important Note:

Students enrolled in Fall 2016 i.e. batch 1604 will be eligible to apply in Phase -IV. Therefore, such students must not apply in Phase-III.
Regards: University Focal Person for PMNL


  • S. No.
    Program
    Duration
    Enrollment after
    1.
    PhD5 yearsJune 30, 2011
    2.MS/ M Phil2 yearsJune 30, 2014
    3.MBA 1.5/ 2.5/ 3.51.5/ 2.5/ 3.5 yearsDec. 31, 2014/ Dec. 31, 2013/ Dec. 31, 2012
    4.Masters (16 year education)2 yearsJune 30, 2014
    5.Bachelors4/ 5 yearsJune 30, 2012/ June 30, 2011
    6.Diploma of Associate Engineering3 YearsJune 30, 2013
    7.FA/ F Sc (Only for FATA and ICT regions)

    2 YearsJune 30, 2014        


  • Only Students enrolled in colleges located in FATA and Islamabad Capital Territory Region
  • Students studying in public sector Universities/ Degree Awarding Institutes duly recognized by HEC. Students studying as distant learner in Virtual University of Pakistan or Allama Iqbal Open University.
  • Students enrolled in PhD/ MS/ M Phil or equivalent 18 year program
  • Students enrolled in 1 or 2-year Masters degree program (morning and evening)
  • Student enrolled in 4-year or 5-year Bachelor degree program (morning and evening)
  • Students studying in government degree or postgraduate colleges of Federal Capital and Federally Administered Tribal Areas.Students' eligibility and enrollment status as defined above shall be determined on the day of distribution of laptops at the HEI, however if there is any unforeseen delay causing ineligibility of students, then those students having their online application submitted and "Accepted for Merit" will maintain their eligibility intact.
  • Students of degree colleges of other provinces may be covered from respective provincial arrangements (if any)
  • Criteria for Students enrolled in distance learning program at VU and AIOU, and students of polytechnic institutes of Pakistan and AJK shall be defined in coordination with respective universities/ boards and will be updated accordingly.
  • No laptop shall be issued to those who have availed in the past from such initiative(s) taken by the government or by the higher education institute.

Also Read: Distribution Of Laptops To Students - Rules And Merit Criteria

NOT to be eligible for laptops: 

Following students will NOT be eligible for laptops under this scheme:
  • Students of any private sector higher education institutes
  • Students of any government degree & postgraduate colleges except of Federal Capital and FATA
  • Students who have received a laptop under any Federal or Provincial Government scheme
  • Foreign nationals, except students from AJK and Indian Occupied Kashmir
  • Any other students not listed above and/ or as identified and decided by the Steering Committee.
Also Read: Virtual University of Pakistan Jobs - 21/12/2016

You Can Also Download Solved Mid Term Papers, Short Notes, Assignment Solutions, Lecture Wise Questions Answers Files, Solved MCQs, Solved Quiz , Solved Mid Term Subjective Papers , Solved Mid Term Objective Papers From This Discussion For Preparation Mid Term Papers of Fall 2015-16.