Showing posts with label Cs201. Show all posts
Showing posts with label Cs201. Show all posts

CS201 Assignment no 3 Fall 2016

By: // No comments:

CS201 Assignment no 3 Fall 2016

Here we have CS201 - Introduction to Programming Assignment No. 3 Solution and Discussion Fall 2016 Due Date Jan 16, 2017. You Can Also Download Solved Final Term Papers, Short Notes, Assignment Solutions, Lecture Wise Questions Answers Files, Solved MCQs, Solved Quiz , Solved Final Term Subjective Papers , Solved Final Term Objective Papers from Virtual Study Solutions For Preparation of Final Term Papers.


Also Read: CS201 Latest Solved MCQs For Final Term Papers

CS201 Assignment no 3:

XYZ University needs a system for student’s courses and their semester details. A data entry operator needs to enter student’s data in to the system, and then the system will show the report of student semester information. Following data will be used by the system.
  • Course code
  • Course name
  • Semester
The system will allow entering data for five courses at a time and will input course code along with course name, later the system will format the report in a more readable form.

Also Read: CS201 Solved Final Term Past Papers Collection

CS201 Assignment no 3 Question:

Your task is to:
Write a C++ program to implement the above mentioned interface

  1. Your program should provide the user with options to enter data for courses along with course code. e.g.
  2. Enter course name along with course code: CS201 Introduction to Programming
  3. After taking course information from user your program should prompt user to enter semester information.
e.g. Enter Semester: Fall 2016
  • The program should input data for five courses and semester.
  • Use structure name “course” in your program. 
  • Use separate functions for taking user inputs, displaying and formatting outputs. 
e.g. Input Courses(),Display Header(),Display Courses(),Format Course(---) etc.

Note: Use structure to implement above program, no credit will be awarded if structure is not used.

Also Read: Virtual University (VU) Exams Pattern

CS201 Assignment No. 3 Solution:

If you want to Get the Solution Directly in Your Inbox. Subscribe us below and save your self Trouble of Searching Assignment Solution.


CS201 Assignment Solution solved.rar, 72 KB

CS201 Solved Subjective Midterm Past Paper - 2009

By: // No comments:

CS201- SOLVED SUBJECTIVE MIDTERM PAPERS

Here is the Complete Collection of CS201 Solved subjective Midterm Paper of 2009. You Can Also Download CS201 Solved Mid Term Papers, CS201 Short Notes, CS201 Lecture Wise Questions Answers Files, CS201 Solved MCQs, CS201 Solved Quizzes , CS201 Solved Mid Term Subjective Papers , CS201 Solved Mid Term Objective Papers From the Links given at the end of this Post.

CS201 MIDTERM PAPER0 - 2009

Here is the CS201 Mid term Paper of 2009 Examination:

CS201 Midterm Question No. 1:

( Marks: 1 )

To Which category of the software “Compiler and Interpreter” belongs?

Answer: (page 11)

The compilers and interpreters also belong to the System Software category.

CS201 Midterm Question No. 2:

( Marks: 1 )

What is the result of the expression x = 2 + 3 * 4 – 4 / 2

12

first multiplies 3*4 = 12 then Division 4/2 = 2

2+12-2 = 12

Also Read: Cs201 old mid term paper - 2015

CS201 Midterm Question No. 3:

( Marks: 2 )

Write a declaration statement for an array of 10 elements of type float. Include an initialization statement of

the first four elements to 1.0, 2.0, 3.0 and 4.0.

Answer:

float tmp [10] = {1.0,2.0,3.0,4.0};

CS201 Midterm Question No. 4:

( Marks: 3 )

Write down the output of the following code?

int array[7], sum = 0;

for(int i=0;i

{

array[i] = i;

sum+= array[i];

}

cout<< “ Sum = “ <

Answer:21

Loop will run times starts from zero and add values from 1 to 6 which is equal to 21

Also Read: CS 201 all past solved midterm papers 2015

CS201 Midterm Question No. 5:

What will be the output of the following segment of C++ code?

int A[5] = {1 , 2, 3, 4};

int i;

for (i=0; i

{

A[i] = 2*A[i];

cout << A[i] << " ";

}

Answer:

2 4 6 8 0

Loops will run 5 times as its starting from zero. It will multiply the value of each item in array as last time

is not initialized so it will multiply it with zero to give zero as output

CS201 Midterm Question No. 6:

( Marks: 10 )

Write a C++ program that will determine if a departmental store customer has exceeded the credit

limit on a charge account.

Program should input the following facts in five variables

1. Account number

2. Balance at the beginning of month (Beginning balance)

3. total of all items charged by customer this month (charges)

4. total of all credits (credits)

5. allowed credit limit

Calculate the new balance

New balance = Beginning balance + charges – credits

Determine if new balance exceeds the allowed credit limit. For those customers whose credit limit is

exceeded. The program should display the message “Credit Limit exceeded.”

Also Read: CS201 INTRODUCTION TO PROGRAMMING PREVIOUS MIDTERM PAPER 2013

CS201 Midterm Question No. 7:

( Marks: 1 )

Which programming tool is helpful in tracing the logical errors?

Answer: (page 13)

Debugger is used to debug the program i.e. to correct the logical errors.

CS201 Midterm Question No. 8:

 
( Marks: 1 )

Give the syntax of opening file ‘myFile.txt’ with ‘app’ mode using ofstream variable ‘out’.

Answer: (page 203)

out.open(“myfile.txt” , ios::app);

Also Read: CS201 Introduction to Programming Short Notes

CS201 Midterm Question No. 9:

( Marks: 2 )

What is the difference between switch statement and if statement.

Answer:

The if statement is used to select among two alternatives. It uses a boolean expression to decide

which alternative should be executed. The switch statement is used to select among multiple

alternatives. It uses an int expression to determine which alternative should be executed.

CS201 Midterm Question No. 10:

( Marks: 3 )

Identify the errors in the following code segment and give the reason of errors.

main(){

int x = 10

const int *ptr = &x ;

*ptr = 5 ;

}

Answer:

*ptr = 5;

declaring a pointer to a constant Integer. You cannot use this pointer to change the value being

pointed to: 

CS201 Midterm Question No. 11:

( Marks: 5 )

If int array[10]; is an integer array then write the statements which will store values at Fifth and

Ninth location of this array,

Answer:

arrary[4] = 200;

arrary[8] = 300;

CS201 Midterm Question No. 12:

( Marks: 10 )

Write a function BatsmanAvg which calculate the average of a player (Batsman), Call this function

in main program (Function). Take the input of Total Runs made and Total number of matches

played from the user in main function

#include // allows program to output data to the screen

// function main begins program execution

int BatsmanAvg(int TotalRuns, int TotalMatches) ;

main()

{

int stopit;

int TotalRuns, TotalMatchesPlayed =0;

cout << "Please Entere the total Runs made : " ;

cin>> TotalRuns ;

cout << "Please Entere the total match played : " ;

cin>> TotalMatchesPlayed ;

cout << "\n Avg Runs = " << BatsmanAvg(TotalRuns,TotalMatchesPlayed);

cin>> stopit; //pause screen to show output

}

int BatsmanAvg(int TotalRuns, int TotalMatches)

{

return TotalRuns/TotalMatches;

}

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

CS201 Midterm Question No. 13:

( Marks: 1 )__________

What is the output of the following program?

#include iostream.h

main ( ) {

int RollNo;

int rollno;

RollNo = 5;

rollno = 8;

cout << “Roll No is ” << rollno; }

Answer:

Program should not compile due to missing <> from following statement

#include iostream.h


if we ignore this then output should be

Roll No is 8

CS201 Midterm Question No. 14:

( Marks: 1 )_____________________

Why we include iostream.h in our programs?

Answer: page 15

iostream.h tells the C compiler to include the contents of a file, This is the name of the library

definition file for all Input Output Streams.

Also Read: MTH202 Midterm Solved - Unsolved Past Papers

CS201 Midterm Question No. 15:

( Marks: 2 )

Find out error in the code given below:

if ( num % 2 = 0 )

cout << "The number is even" << endl;

Answer:

if ( num % 2 = 0 ) There should be extra = sign following is right statement

if ( num % 2 = =0 )

CS201 Midterm Question No. 16:

( Marks: 3 )

How learning to design programs is like learning to play soccer?

Answer: (page 6)

“Learning to design programs is like learning to play soccer. A player must learn to trap a ball, to dribble

with a ball, to pass, and to shoot a ball. Once the player knows those basic skills, the next goals are to learn

to play a position, to play certain strategies, to choose among feasible strategies, and, on occasion, to create

variations of a strategy because none fits. “

Also Read : ISL 201 Mid term SOlved Papers

CS201 Midterm Question No. 17:

( Marks: 5 )

Write the procedure of data insertion in middle of the files by Merge Method practiced in older systems?

Answer: (page 218)

· Opened the data file and a new empty file.

· Started reading the data file from beginning of it.

· Kept on copying the read data into the new file until the location we want to insert data into is reached.

· Inserted (appended) new data in the new file.

· Skipped or jumped the data in the data file that is to be overwritten or replaced.

· Copied (appended) the remaining part of the file at the end of the new file

CS201 Midterm Question No. 18:

( Marks: 10 )

Write a recursive function that takes three arguments (an integer array, starting subscript ‘s’ and

ending subscript ‘e’ ).

In first recursive call, the function should display the array from subscript ‘s’ (s = 0) to ‘e’ (e =

size of array). In each successive call, the function should print the array from index s+1 to e. T

function should stop processing and return when starting subscript becomes equal to ending

subscript.

For example, if user enters values for array 2, 3, 4, 5, 6 then the recursive function must display the

following output.

2 3 4 5 6

3 4 5 6

4 5 6

5 6

6

Answer:

#include ;

void PrintArray(int arrayInput[], int &s, int &e);

main ( )

{

int pause;

int TestArray [6] = {1,2,3,4,5,6};

int StartPoint = 0;

int EndPoint = 5;

PrintArray(TestArray , StartPoint, EndPoint);

cout<<"\n";

PrintArray(TestArray , StartPoint, EndPoint);

cout<<"\n";

PrintArray(TestArray , StartPoint, EndPoint);

cout<<"\n";

PrintArray(TestArray , StartPoint, EndPoint);

cout<<"\n";

PrintArray(TestArray , StartPoint, EndPoint);

cout<<"\n";

PrintArray(TestArray , StartPoint, EndPoint);

cin >> pause;

}

void PrintArray(int arrayInput[], int& s, int& e)

{

for (int i = s; i<= e; i++)

{

cout<< arrayInput[i];

}

s=s+1;

}

CS201 Midterm Question No. 19:

( Marks: 1 )

Suppose ‘z’ is a variable of type int. What will be the result of x = 27/4:

CS201 Midterm Question No. 20:

( Marks: 1 )

Give the general syntax of definition of structure.

Answer: repeat

Question No: 19 ( Marks: 2 )

Consider the structure

struct Customer

{

int custnum;

int salary;

float commission;

};

A programmer wants to assign 2000 for the structure member salary in the above example of

structure Customer with structure variable cust1 What line of code should he write

CS201 Midterm Question No. 21:

( Marks: 3 )

What is compiler?

Answer: repeat

CS201 Midterm Question No. 22:

( Marks: 5 )

What is the difference between while and for loop?

Answer:

when number of iterations known we use for loop otherwise we will use while loop

CS201 Midterm Question No. 23:

( Marks: 10 )

Write a void function( ); that takes integer numbers from the user and then displays the sum of

odd and even numbers entered by the user. Your program should terminate if user enters a

negative number

Thanks for Reading. Subscribe Below To recieve CS201 Papers in Your Mail box. or You can Like our facebook Page.

CS201 Solved Subjective Midterm Paper 2011

By: // No comments:

CS201- Solved Subjective Midterm Paper

Here is the Complete Collection of CS201 Solved subjective Midterm Paper of May/10/2011. You Can Also Download CS201 Solved Mid Term Papers, CS201 Short Notes, CS201 Lecture Wise Questions Answers Files, CS201 Solved MCQs, CS201 Solved Quizzes , CS201 Solved Mid Term Subjective Papers , CS201 Solved Mid Term Objective Papers From the Links given at the end of this Post.

CS201 Solved Subjective Midterm Paper 2011

CS201 MIDTERM EXAMINATION - Lectures 1-22

CS201 Midterm Paper Question No. 1:


( Marks: 2 )

What is the difference between switch statement and if statement.

Answer:

1.if statement is used when we have to check two conditions while switch is a multi conditional control statement

2. SWITCH statement can be executed with all cases if the “break” statement is not used whereas IF statement has to be true

to be executed further.

CS201 Midterm Paper Question No. 2:

( Marks: 2 )

Why we close a file after use?

Answer:

To save our data stored on file. Also this process makes our program fast and reliable.

OR

You have finished with it. This is particularly important if you are writing to the file. The operating system does not switch on the

disk drive to write just a single character to the disk, rather it waits until it has a load to write and then writes the lots in one go.

CS201 Midterm Paper Question No. 3:

( Marks: 2 )

A two-dimensional array has 3 rows and 4 columns. Write down the syntax to initialize first element of all

three rows of two-dimensional array with value 2.

Answer:

int matrix[0][0]=2

int matrix[1][0]=2

int matrix[2][0]=2

CS201 Midterm Paper Question No. 4:

Identify the errors in the following code segment and give the reason of errors.

main(){

int x = 10

const int *ptr = &x ;

*ptr = 5 ;

}

Answer:

Int x=10….No ending semicolon.

*ptr=5... Declaring a pointer to constant integer. You cannot use this pointer to change the value being

pointed to.

CS201 Midterm Paper Question No. 5:


Can you use an assignment operator to assign the value of one C-string to another?

Answer:

Yes we can assign the one value of C-string to another using assignment operator. We can

assign the value of one string to another string through this method.

A[0]=B[0]

A[1]=B[2]

A[3]=B[3]

And we can assign the whole string to another C string using Assignment operator by using loops.

CS201 Midterm Paper Question No. 6:

Why binary search algorithm is more efficient than the linear search algorithm?

Answer: (page118)

Binary search algorithm is more efficient than liner algorithm because the arrays are sorted in asending or

desending order and we use “devide and conqrer” technique. In binary search each iteration reduces the

search by the factor of two but in the linear we have the same number of searches as we have the number of

elements.e.g,if we have array of 1000 elements the linear search will take 1000 iterations however binary

search will take max 10.

CS201 Midterm Paper Question No. 7:

( Marks: 5 )

Write down the output of the code given below :

Hint:

Size of char is 1 byte

Size of int is 2 byte

Size of float is 4 byte

#include

union mytypes_t {

char c;

int i;

float f;

} mytypes;

int main(){


mytypes.c = 'H';

mytypes.i = 15;


cout << sizeof(mytypes)<


mytypes.i = 15;

mytypes.c = 'H';


cout << sizeof(mytypes)<

system("PAUSE");

return 0;

}

CS201 Midterm Paper Question No. 8:

( Marks: 1 ) 
Please choose one

In Program commenting the code liberally is

Answer: (page 06)

It need to be self-contained and understandable. Comments should be placed liberally. The comments

should explain the logic, not the mechanics. Try to avoid fancy programming.

CS201 Midterm Paper Question No. 9:


Which header file must be included while handling files?

Answer: (page 199)

Include

CS201 Midterm Paper Question No. 10:

 ( Marks: 1 )

What is meant by C++ statement: const int *ptr = &x;

Answer:

ptr is a pointer to data of type const int type. And to assign the address of x to pointer ptr

CS201 Mid Term Past Papers: 

CS201 Midterm Paper Question No. 11:

( Marks: 2 )

What is a truth Table?

Answer: (page 562)

We know the concept of truth table. The truth tables are very important. These are still a tool available for

analyzing logical expressions. We will read logic design in future, which is actually to do with chips and

gate. We find it difficult to evaluate a complicated logical expression. Sometimes the logic becomes

extremely complicated so that even writing it as a simple syntax statement in any language. These are used to

make a big circuit with the use of minimum chips. These minimization techniques deal with Boolean algebra i.e.

logic.

CS201 Midterm Paper Question No. 12:

( Marks: 3 )

(1) An array day is declared as: int day[] = {1, 2, 3, 4, 5, 6, 7};

How many elements does array 'day' has?

Answer:

7 elements

(2) If the declaration is changed as: int day[7] = {1, 2, 3, 4, 5, 6, 7};

How many elements does array 'day' has?

Answer:

7 elements

CS201 Midterm Paper Question No. 13:

( Marks: 5 )

What are similarities and differences between Structures and Unions?

Answer: (page 242)

In structures, we have different data members and all of these have their own memory space. In union, the

memory location is same while the first data member is one name for that memory location. However, the

2nd data member is another name for the same location and so on. Consider the above union (i.e.

intOrChar) that contains an integer and a character as data members. What will be the size of this union?

The answer is the very simple. The union will be allocated the memory equal to that of the largest size data

member. If the int occupies four bytes on our system and char occupies one byte, the union intOrChar will

occupy four bytes

CS201 Midterm Paper Question No. 14:

what is the difference in pointer and veriable?

CS201 Midterm Paper Question No. 15:

what is the difference in tellg() and tellp()

Answer: Page 215

tellg () gives us the current get position of the file pointer, tellp () function is used to determine the next position to write a character

CS201 Midterm Paper Question No. 16:

why we close a file after use?

CS201 Midterm Paper Question No. 17:

call by value and call by reference?

Answer: Page 84-266

There is another way to call a function in which the function can change the values of variables that are passed as arguments, of

calling program. Such function call is known as call by reference.

Call by value means that when we call a function and pass some parameter to it, the calling function gets the

copy of the value and the original value remains unchanged.

CS201 Midterm Paper Question No. 18:

give one use of pointer

Answer: Page 150

The one use of pointer is to interchange two values that means it is used to swapped the values.

CS201 Midterm Paper Question No. 19:

bubble sort

Answer: Page 149

Bubble sorting is a technique, in which we put value of one variable in a temporary location to

preserve it and assign the value of second variable to the first. Then the temporary value is

assigned to the second variable

3. what happened when we increment pointer

The effect of the increment operator ++ on a pointer object is to have the new address to which it

points be the starting location of the object immediately after the object to which it previously

pointed.

CS201 Midterm Paper Question No. 20:

basic steps for file handling

Answer: Page 199

The basic steps of file handling are:

Open the file

Read and write

Close the file

Download CS 201 All Past Solved Midterm Papers

You can also Download CS 201 all past solved midterm papers from links below:

CS201 Assignment No 02 Solution Fall 2016

By: // No comments:

CS201 Assignment No 02 Fall 2016

Here You can download CS201 Assignment No 02 Solution - Discussion Due Date: 02 Dec 2016.

CS201 Assignment No. 02

Q: Write a program that takes input of 10 integers into an array.
Give two options to the user:
1= copy odd numbers from the array to a new array (odd[] array) and sort “odd[]” array in ascending order

2= copy even numbers from the array to a new array (even[] array) and sort “even[]” array in ascending order

Q: Write a function that accept (odd[] or even[]) array and sort it
Use bubble sort technique to sort the given array
Display the sorted array.

Hint:: you can use 3 arrays like arry[], odd[], even[].

Sample output:

Taking input for array from user

Ask user for an option

Pass array to function and display sorted array

CS201 Assignment Instructions

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

  • Assignment is submitted after due date.
  • Submitted assignment does not open or file is corrupt.
  • Assignment is copied (From internet/students).
Also Read: PM Laptop Scheme for Virtual University Students 2016-17


CS201 Assignment Tools:

Software allowed to develop Assignment

- Dev C++

CS201 Assignment Objectives:

To enable students to write, compile and execute a program in DevC++. Moreover to familiarize students with the concepts of:
  • Array manipulation
  • Array passing to functions
  • Sorting Of Array (Bubble sort)
Also Read: CS 201 all past solved midterm papers 2015


CS201 Assignment Submission Instructions

You have to submit only.cpp file on the Assignments interface of CS201 at VULMS. Assignment submitted in any other format will not be accepted and will be graded zero marks.

Also Read: HOW TO MAKE DATESHEET FOR EXAM at VU

CS201 Assignment Deadline:

The deadline to submit your CS201 assignment solution is 2nd December, 2016. Your assignment must be submitted within the due date through VULMS. No assignment will be accepted through email after the due date.

CS201 Assignment No 02 Solution Fall 2016

Here is the Complete and Final Solution of CS201 Assignment No 02 for Virtual Students.

Solution Files Fulfills all the requirements...
• Array manipulation
• Array passing to functions
• Sorting Of Array (Bubble sort)

Download links for CS201 Assignment No 02 Solution

Download the CS201 Solution File from the links below

Feel Free to ask any question OR query

You Can Also Download Solved Mid Term PapersShort NotesAssignment SolutionsLecture Wise Questions Answers FilesSolved MCQsSolved Quiz , Solved Mid Term Subjective Papers , Solved Mid Term Objective Papers From This Discussion For Preparation Mid Term Papers of Fall 2015-16.

CS201 Assignment No 01 Solution / Discussion Fall 2016

By: // No comments:

CS201 Assignment No 01 Solution/Discussion

Here is complete CS201 Assignment No 01 with Solution & Discussion Due Date:17-11-2016. 

CS201 Assignment Deadline:

The deadline to submit your assignment solution is 17th November, 2016. Your Cs201 assignment must be submitted within the due date through VULMS. No assignment will be accepted through email after the due date.

You should also read:

ENG201 Assignment no. 1 Solution Fall 2016
ENG101 Assignment No 1 Solution Fall 2016
STA301 Assignment No.1 Solution 2016
CS101 Assignment No. 01 Fall 2016 - Introduction to Computing
CS304 Assignment no.1 Solution Fall 2016
CS401 Assignment no.1 Solution 2016

CS201 Assignment No 01

ABC University offers admission in three disciplines 1) Computer Science 2) Software Engineering 3) Telecom Engineering. An admission test has already been conducted by the university. The university provides an interface to the interested candidates where they can check their eligibility for the disciplines offered by the university.

Eligibility criteria for the offered programs is:

  • Computer Science (70% marks)
  • Software Engineering (85% marks)
  • Telecom Engineering (80%)
Formula for calculating the eligibility percentage is:

(Admission test marks percentage x 0.20) + (Matric marks percentage x 0.30) + (Intermediate marks percentage x 0.50)

Tags: Cs201, cs201 assignment solution, cs201 Solved assignment, CS201 Assignment 01 Solution, Assignments, assignment solution, VU, Vulms, virtual university Assignments

Your task is to:

Write a c++ program to implement the above mentioned interface for eligibility assessment

Your program should provide the user with options to choose the degree program for admission e.g.

Enter ‘c’ for Computer Science

Enter ‘s’ for Software Engineering

Enter ‘t’ for Telecom Engineering

After taking user’s choice of degree program, the program should ask the user to enter his/her marks percentages of admission test, matric and intermediate results

After that, program should calculate the eligibility percentage according to the provided formula and show the user if he/she is eligible for the selected degree program or not

For the eligible candidates, the program should show the message “Congratulations! You are eligible for the selected program” and for non-eligible candidates the program should show “Sorry! You could not qualify for the selected program”

If the user enters a choice other than ‘c’, ‘s’, or ‘t’, the program should show the following error message: “Invalid input! Enter the correct input option again”

Press any key to continue..

On pressing any key from the keyboard, the program should start again from the beginning

The program should keep showing the same error message until the user enters one of the correct inputs

At the end of the program, the program should ask the user if he/she wants to check eligibility for another degree program. If the user presses y or Y, the program should start again from the beginning, or terminate otherwise.
Sample output:
The sample output is provided in the animated image output.gif



CS201 Assignment No 01 Solution

CS201 (Introduction to Programming) Assignment Solution.
This assignment can be done in different ways but i did it according to the required topics mentioned by the student.
Download Solution of CS201 Assignment No.1 from Link below: 


In some version of Dev C++ compiler, system("cls"); doesn't work. so comment it.
Everyone must need to make changes to avoid by copying issue.
Feel free to ask any question OR query.

CS 201 solved midterm Past Papers Download 2015

By: // No comments:

CS 201 solved midterm Past Papers

Welcome to Virtual Study Solutions. Here we have CS 201 all past solved midterm papers Collection of 2015. We Also have huge range of cs201 virtual university past papers available to download.

Here is also some important helping material related to the Cs201 ( Solved MCQs, Assignments, Short Notes, Solved Past Papers, E-Books, Recommended Books, FAQs.
Get CS201 midterm past papers, download CS201 midterm solved papers also download CS201 final term papers and CS201 final term solved papers.
CS 201 solved midterm Past papers 2015
CS201Allmidtermpaperzin1filepages1to63.pdf, 1.1 MB
CS201MegaSolvedShortQuestions.pdf, 542 KB

here are some more papers of CS 201 all past solved midterm papers CS 201 all past solved midterm papers 2015 Attachments:

CS201SolvedMIDTERMPapers.doc, 61 KB

You should also Read about:

CS 201 all past solved midterm papers 2015 current papers fall 2011CS 201 all past solved midterm papers 2015 Attachments:

CS201SolvedMIDTERMPapers1.doc, 61 KB

CS201SolvedMIDTERMPapers2.doc, 106 KB

cs2012011.doc, 27 KB

CS 201 all past solved midterm papers 2015 Attachments:
CS 201 past solved papers .pdf, 389 KB

You Can Download Solved Mid Term Papers, Short Notes, Lecture Wise Questions Answers Files, Solved MCQs, Solved Quizzes , Solved Mid Term Subjective Papers , Solved Mid Term Objective Papers From This Discussion For Preparation Mid Term Papers of Fall 2015.

CS201 Past VU Solved Assignments - Part 1

By: // No comments:

CS201 Assignment No 2 Due Date 28-06-2016

By: // No comments:

CS201 Assignment

Here we have Cs201 Assignment no 2 as it is continuity of assignment 1. You have to do the same task as you did in assignment 1 but this time you have to use structure variables. 

CS201 Assignment No 2

You have to write C++ program in which;
• You are required to define 2 structures named as Rectangle and Trapezoid.
• Rectangle has 3 data members, width, length and area
• Trapezoid has 4 data members named as height, base1, base2 and area.
• Provide 2 options to the user as below:
 Enter 1 to calculate the area of Rectangle
 Enter 2 to calculate the area of a Trapezoid

• If the user enters 1, then
 Object (variable) of Rectangle structure is created
 The program should ask the user to enter the width and length of the rectangle
 Assign input values to data members of Rectangle Structure
 Then show the result after calculation. Formula for calculating Area of rectangle is
Area = width x Length.

• If the user enters 2, then
 Object (variable) of Trapezoid structure is created
 The program should ask the user to enter the base1, base2, and height of the trapezoid
 Assign input values to data members of Trapezoid structure
 Then shows the result after calculation. Formula for calculating Area of trapezoid is
Area =
• You must implement two different functions for calculating areas of rectangle and trapezoid.
• After taking the choice from the user in form of 1 or 2 and assigning entered values to respective structure data members, the relevant function should be called to calculate area.
• Function for calculating area should return a value that would be stored in data member of structure to store respective area.
• After storing area, it should be displayed on screen.
• After showing the output to the user, you need to ask the user if he/she wants to do another calculation. If the user presses y or Y, then the program should ask the user again to enter the choice of shape otherwise the program should be terminated.

Screenshot of the program execution is given below for both shapes:


Cs201 Assignment no. 2 Solution:

/*
 BY Zohaib Khan "Virtual Study Solutions"
 remove the above type your name and roll no
 This program will calculate the area of rectangle and trapezoid using structure data type
*/
#include <iostream>
using namespace std;

struct Rectangle
 {
  double width;
  double length;
  double area;
 };
 
struct Trapezoid
 {
  double base1;
  double base2;
  double height;
  double area;
 };
 
double rectangleArea( Rectangle rectangle );
double trapezoidArea( Trapezoid trapezoid );
 

 main()
{
 char c;
 
 do{
  int choice;
  cout << "\nEnter 1 to calculate area of rectangle\n";
  cout << "Enter 2 to calculate area of trapezoid\n";
  cout << "\n\nEnter your choice: ";
  cin >> choice;
  
  if(choice == 1)
  { 
   Rectangle rectangle;
   cout << "Enter the width of rectangle: ";
   cin >> rectangle.width;
   cout << "Enter the length of rectangle: ";
   cin >> rectangle.length;
   rectangle.area = rectangleArea( rectangle );
   cout << "The area of rectangle is: " << rectangle.area;
   
  }
  
  else if(choice == 2)
  { 
   Trapezoid trapezoid;
   cout << "Enter the base1 of trapezoid: ";
   cin >> trapezoid.base1;
   cout << "Enter the base2 of trapezoid: ";
   cin >> trapezoid.base2;
   cout << "Enter the height of trapezoid: ";
   cin >> trapezoid.height;
   trapezoid.area = trapezoidArea( trapezoid );
   cout << "\nThe area of trapezoid is: "
    << trapezoid.area;
   
  }
  else{
   cout << "Error! please enter 1 or 2.";
  }
  cout << "\n\nDo you want to do another calculation: ";
  cin >> c;
 } while( c == 'y' || c == 'Y');


   
   return 0;
}

double rectangleArea( Rectangle rectangle)
 {
  return (rectangle.length) * (rectangle.width);
 }

double trapezoidArea(Trapezoid trapezoid )
 {
  return ( trapezoid.height *( (trapezoid.base1 + trapezoid.base2) / 2) );
 }

You should also Read :

We Offer Virtual University Of Pakistan, Assignments, Mid-Term/Final-Term Papers And Quiz, Solved Questions And Much More For Students Of Virtual University.We are here to facilitate your learning and do not appreciate the idea of copying or replicating solutions.

Our main purpose here discussion not just Solution. We are here with you hands in hands to facilitate your learning and do not appreciate the idea of copying or replicating solutions.

CS201 Latest Solved MCQs (23 to 45 Lectures)

By: // No comments:

CS201 Solved MCQs

CS201- Introduction to Programming. Latest Solved Mcqs from Previous Final Term Papers. You can download complete Solved MCQs from here:
Cs201 Complete Solved MCQs.pdf

CS201 Introduction to Programming Question # 1 

We can also use member functions with cin and cout objects
 1) : True
 2) : FALSE

 Correct Option : 2

CS201 Introduction to Programming Question # 2

If the statements int j,k; j = 123; k= 234; int* q, * r; cout < < *q < < ' ' < < * r ; are executed, what will be displayed?
 1) : The values of j and k
 2) : The addresses of q and r
 3) : The addresses of j and k
 4) : garbage values

 Correct Option : 4

CS201 Introduction to Programming Question # 3

 Which one of the following operators is a unary operator?
 1) : OR ( || )
 2) : AND ( &&)
 3) : XOR ( ^ )
 4) : Complement operator ( ~ )

 Correct Option : 4

CS201 Introduction to Programming Question # 4 

 The statement i++; is equivalent to
 1) : i = i + i;
 2) : i = i + 1;
 3) : i = i - 1;
 4) : i --;

Correct Option : 2

CS201 Introduction to Programming Question # 5

If we open a file stream myfile for reading, what will give us the current position of the file pointer? 1) : tellg()
 2) : tellp()
 3) : seekg()
 4) : seekp()

 Correct Option : 1

CS201 Introduction to Programming Question # 6

 Application Software’s are use to
 1) : Type letters
 2) : Control computer hardware
 3) : Solve end user problems
 4) : Develop Graphics

 Correct Option : 3

CS201 Introduction to Programming Question # 7 

 When we write a class template the first line must be:
 1) : template < class class_type>
 2) : template < class data_type>
 3) : template < class T >, Here T can be replaced with any name but it is preferable.
 4) : class template

 Correct Option : 3


CS201 Introduction to Programming Question # 8 

 When a macro takes arguments then it is called_________________.
 1) : Function
 2) : Procedure
 3) : Parameterized macro
 4) : Simple macro

 Correct Option : 3

CS201 Introduction to Programming Question # 9 

 By default an array of characters is passed by value to a function,
 1) : TRUE
 2) : FALSE

 Correct Option : 2

CS201 Introduction to Programming Question # 10

Using dynamic memory is more efficient then the static memory.
 1) : True
 2) : FALSE

Correct Option : 1

CS201 Introduction to Programming Question # 11

 Using dynamic memory is more _____________ then the static memory.
 1) : Costly
 2) : Expansive
 3) : efficient
 4) : Difficult

 Correct Option : 3

CS201 Introduction to Programming Question # 12

 Before exiting the program, make sure that the allocated memory has freed.
 1) : True
 2) : FALSE

Correct Option : 1

CS201 Introduction to Programming Question # 13

A preprocessor directive is identified by _________ symbol
 1) : #
 2) : $
 3) : %
 4) : ##

 Correct Option : 1

CS201 Introduction to Programming Question # 14

The default constructor has no arguments
 1) : True
 2) : FALSE

 Correct Option : 1

CS201 Introduction to Programming Question # 15 

 The data members of the class are initialized at runtime
1) : True
2 ) : FALSE

Correct Option : 1

You can also read about:


For More CS201 Solved MCQs Download the PDF file from link below:

Download Link for Complete CS201 Solved MCQs

CS201 GDB Solution Feb 12, 2016

By: // No comments:

CS201 GDB Solution

Dear Students Topic of CS201 introduction to programming GDB is as under:

A security agency wants to develop an application that will manage its employees. Application will store employee’s personal information, deputation as security agents, expenses and job rotation along with their past experience in security agencies.
Security agency also wants to get / store NADRA verification of employees by using Verisys. Company wants that no other application can access their (employees) information except what they want to show to their users but on the other hand only get NADRA verification.

If you are deployed as software design engineer to design this application, what would be your approach to follow in programming paradigm i.e. Structures Programming or Object Oriented Programming?

Choose only one option of programming paradigm and also 3 reasons to choose the option (Keeping in view the scenario provided above). A sample of answer is provided below;


CS201 GDB  Programming paradigm: ___________________________

CS201 GDB  Reasons:

1: ____________________

2: ____________________

3: ____________________

CS201 GDB Important Notes:

  • NO GDB is accepted via e-mail in either case
  • Lengthy replies of GDB will cause in deduction of marks

CS201 GDB Instructions:

- GDB would be available for submission for 2 days that are 18/02/2016 and 19/02/2016 (Thursday - Friday).
- Copied comments / answers from any source will be awarded zero marks.

You should aslo read about:

CS201 GDB Solution

Programming paradigm: Object Oriented Programming (OOP)

CS201 GDB Reasons:

  • OOP provides Abstraction. Abstraction is "To represent the essential feature without representing the back ground details."
  • OOP provides Encapsulation. Wrapping up data member and method together into a single unit (i.e. Class) is called Encapsulation.
  • OOP provides inheritance. When a class acquires the property of another class is known as inheritance.
  • Inheritance is process of object reusability.

CS201 GDB Explanation: 

Here in Cs201 introduction to programming gdb. If you think every thing in term of objects. There is Person type object. This is parent of employee type. We can inherit name type object functionality in employee. And also can include some additional information that is bind with employee. We can store in derived class which is employee.

Cs201 Pre-Assignment Solution and Discussion

By: // No comments:

CS201 Pre-Assignment Solution and Discussion 

Pre – Assignment practice program (Graded)
Problem statement:
                You are required to write a program in which the program will ask the user to enterLower limit and Upper limit for a loop. It means that loop will start from the lower limit and will execute till the upper limit. After taking the input, the program should show the sum of all the numbers from lower limit to upper limit in each iteration of the loop. For example if the user enters 3 as lower limit and 8 as upper limit. The output should be as:
3  7  12  18  25  33
What you are doing here is you are adding the lower limit into the number next to it and showing it in the same iteration.
Also the program will count the even and odd numbers in the output. In this example, the count of the even numbers will be 2 and the odd numbers will be 4. So the final output would be

Sample Output:
Enter the lower limit for the loop: 3
Enter the upper limit for the loop: 8
3  7  12  18  25  33
Even numbers: 2
Odd numbers: 4

Our main purpose here discussion not just Solution
We are here with you hands in hands to facilitate your learning and do not appreciate the idea of copying or replicating solutions.

 Solution:

#include<iostream>
using namespace std;
main()
{
int lowerLimit,upperLimit;
int sum=0,even=0,odd=0;
cout"Please enter lowerLimit:";
cin>>lowerLimit;
cout"Please enter upperLimit:";
cin>>upperLimit;
for(int i=lowerLimit;i<=upperLimit;i++)
{
sum=sum+i;
coutsum"\t";
if((sum%2)==0)
{
even=even+1;
}
else
{
odd=odd+1;
}
}
cout "even numbers "even endl;
cout "odd numbers"odd endl;
}

You Can Download Solved Mid Term Papers, Short Notes, Lecture Wise Questions Answers Files, Solved MCQs, Solved Quizzes , Solved Mid Term Subjective Papers , Solved Mid Term Objective Papers From This Discussion For Preparation Mid Term Papers of Fall 2015
For important helping material related to the subject ( Solved MCQsAssignmentsShort NotesSolved Past Papers, E-Books, Recommended Books, FAQs, Help & Tutorials , Short Questions Answers & more). You must view all the featured discussion in this subject group.

CS201: Assignment No 04 Solution

By: // No comments:

Cs201 Introduction to Programming

cs 201 Assignment no 4:

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 submitted assignment does not open or file is corrupt.
Assignment is copied(partial or full) from any source (websites, forums, students, etc)

Objective:

The objective of this assignment is to provide an on hand experience of:
Learn to use object oriented concept
Learn to map real world problem in the context of computer programming
Guidelines:

Create a class for “StaffRegistration”.
Provide getter and setter functions for each data member.
Use two member functions “InputStaffData()” and “DisplayStaffData()” for getting input and displaying it respectively.
Code should properly be indented and well commented.
Follow C/C++ rules for code documentation.
Use only Dev-C++ for this assignment. If you are using any other tool then mention it at top of your code file as comments.

Assignment Description

Etradehouse is an online shopping store, which deals with selling of goods across Europe. They have regional offices in different countries (Pakistan, China & UK). The support, purchase and sales staff works in regional office (Pakistan).
They hire new employees in order to run their business smoothly, but currently they have no automated system for hiring of their employees. As a C++ programmer, your task is to write a computer program in C++ which could register the newly hired staff and then display summary of it.

The data about the staff, that the company is interested are as follows:-
CNIC ( National Identity Card Number in the form XXXXX-XXXXXXX-X)
Name ( Name of employee)
Father Name
Date of Birth
Qualification
Designation
Salary
Joining Date
Contact Number
Address
Your Task
Your task is to create the program which produces the output as shown in “screenshot”.
Screenshot of the desired  output:
Here display your name & VU ID.

Note
Object oriented approach MUST be used in order to implement the assignment.
Submission
You are required to  your assignment through LMS in zip format containing two files.
Your solution C++ program i.e .cpp file
An MS Word document containing screenshot of your program output/execution

Cs 201 Assignment No 4 Solution:

#include
using namespace std;
class StaffRegistration
{
private:
char cnic[16];
char name[20];
char fname[20];
char dob[11];
char degree[10];
char desig[15];
int sal;
char joinDate[11];
char cell[13];
char address[40];
public:
void InputStaffData()
{
cout"\nPlease enter National Identity Card Number(CNIC)"endl;
cin>>cnic;
cout"Please enter name"endl;
cin >> name;
cout"Please enter father name"endl;
cin >> fname;
cout"Please enter date of birth (dd/mm/yyyy)"endl;
cin>>dob;
cout"Please enter qualification"endl;
cin>>degree;
cout"Please enter salary"endl;
cin>>sal;
cout"Please enter joining date (dd/mm/yyyy)"endl;
cin>>joinDate;
cout"Please enter contact number"endl;
cin>>cell;
cout"Please enter address information"endl;
cin>>address;
cout"Record added successfully !!!"endlendl;
}
void DisplayStaffData()
{
cout"CNIC: \t\t\t"cnicendl;
cout"Name: \t\t\t"nameendl;
cout"Father Name: \t\t"fnameendl;
cout"DoB: \t\t\t"dob endl;
cout"Qualification: \t\t"degreeendl;
cout"Salary: \t\t"salendl;
cout"Joining Date: \t\t"joinDateendl;
cout"Contact Number: \t"cellendl;
cout"Address: \t\t"addressendl;
}
};
main()
{
system("cls");
StaffRegistration emp;
emp.InputStaffData();
cout"---------------------------------------------------------------------------"endl;
cout"\t\t\t\ DISPALAY STAFF INFORMATION"endl;
cout"---------------------------------------------------------------------------"endl;
emp.DisplayStaffData();
cout"---------------------------------------------------------------------------"endl;
system("pause");
}