We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More


Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

Concern past papers too

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 747

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Attachments:

Replies to This Discussion

Loops:

A Computer is used for performing many Repetitive types of tasks The Process of Repeatedly performing tasks is known as looping . The Loop is that in which a task is repeated until the condition is true or we can say in the loop will Executes all the statements are until the given condition is not to be false.

 

There are the three types of loops in the java

while

do-while

for

 

all these are used for performing the repetitive tasks until the given condition is not true.

 

While:

While Loop is Known as Entry Controlled Loop because in The while loop first we initialize the value of variable or Starting point of Execution and then we check the condition and if the condition is true then it will execute the statements and then after it increments or decrements the value of a variable. But in the while loop if a Condition is false then it will never Executes.

 

 Do while:

- This is Also Called as Exit Controlled Loop we know that in The while loop the condition is check before the execution of the program but if the condition is not true then it will not execute the statements so for this purpose we use the do while loop in this first it executes the statements and then it increments the value of a variable and then last it checks the condition So in this either the condition is true or not it Execute the statement at least one time.

 

For:

In This loop all the basic operations like initialization, condition checking and incrementing or decrementing all these are performed in only one line. This is similar to the while loop for performing its execution but only different in its syntax.

 

Subject:CS201 Introduction to programming 

Date:28-05-2013

total mcqs of 1MArks each: 20

Total short Subjective  Questions of 3Marks:2Total short subjective Questions

Q) Write the syntax for calling function string manipulation function which compare the first 5 character array "name" with string "asdf"?

Q))When a pointer isincremented then how many bytes will it move to change its address?

Q)Declare an integer array longroutes and pointer routrptr and assign the address of array longroutes to the pointer variable routeptr to the pointer?

Q)Find which is legal and illegal ?

Q) show the output of the following code:

main()

{char st[]="~This is -a sample string!";

char*pch;

pch=strtoklstr,",-s`";

while(pch!=Null)

coutPch;

pch=strtok(NULL,",-s~")

}

return 0;

}

CS201 VU Current Midterm Spring 2013 Papers

CS201 VU Current Midterm Spring 2013 Papers

Q1: Write down the general syntax of switch statement. 2 Marks

Q2: Why we close a file after use? 2 Marks

Q3: When a pointer is incremented then how many bytes will it move to change its address?
2 Marks

Q4: If there are 2n element in an array then what would be the number of iterations required to search a number using binary and linear search? 3 Marks

Q5: write down the functions definition if we want to pass the argument to a function by reference without changing the values stored at address. 5 Marks

Q6: What will be the output of the following code segment 5 Marks

, int x= 6;
int y;
x = x y =” x”>> 1;
cout “x = ” y =” ””>

Another Paper:-

6 to 7 MCQs came form past papers

1 or 2 short questions came from past papers.

Some of the short questions that I remember were:

1. What is the difference between pre-increment and post-increment operator
2. One major use of pointer
3. If an array has elements 2^n, then what would be the maximum number of iterations required to search by binary and linear search? (I don’t remember the
exact statement of the question) (answer is on page # 118)
4. Write the procedure of data insertion in middle of the files by Merge Method practiced in older systems? (answer is given in page # 218, in handouts)
5. Functions used to read/write more than a single character or a single line while using Files? (read chapter # 19, on page 221 i think this concept has
been discussed)

In the long question, a program was given and we were required to point out the compilation errors and correct them.
It was easy.

please share some more new papers.

Thanks for sharing 

CS201 Introduction to Programming

Today Midterm Paper (27-5-2013)

 

Total Questions :26

20 Marks: 20 MCQ’S

2 Marks: 2 questions

3Marks: 2 questions

5Marks: 2 questions

 

  1. There is a pointer “ptr”of type int then address of which type of variable the ptr will store in it?

Variable of type char

Variable of type int

Variable of type double

Variable of type short

 

  1. Overflow condition occur when we try to assign a value to a variable which is _______

Less than its max size

Greater than its max size

Equal to

With in its range

 

  1. Which one of following statement is equal to x%=5?

x=%x5                         x=x%5             x=%5               x%=x5

 

  1. < , <=, >, >= are called ________ operators.

Logical Arithmetic                     Relational                     Conditional

 

  1. Correct way to initialize a character array ‘course’ with string “programming” is:

Course[12]=”programming”;

Course[]={”programming”};

 Course[]=’programming’;

 Course=”programming”;

 

  1. In c/c++ null cahracter is represented as:

\n                     \0                     \t                      \r

 

  1. To access the address of the variable ________ operator is used.

*

->

&&

&

 

  1. Afunction is a block of statements(codes) that can be ________

Defined repeatedly

Used limit no. of times

Defined once and used(call) as many times as required

Used only once

 

  1. In a return type of a function is void then it means that it will_______

Return any type of data

Return no data

Return some specific type of data                                              Return just char data

 

 

  1. C language was evolved from ________ language.

BASIC

FORTRAN

C++

B and BCPL

 

  1. The information stored in computer memory is ________

Volatile

Non-volatile

Redundant

Permanent

 

  1. A record is group of related ____________

Data

File

Bytes

Fields

 

  1. When accessing a structure member, the identifier to the left of the dot operator is the name of _________

A structure member

A tag

A variable

A keyword structure

 

  1. Stuctures are __________ allocation.

Heap

Queue

Stack

Cache

 

  1. An object of __________ class be created for saving the current possition of any opened file before reading from the file.

Filepos

Streampos

Stream

File stream

 

SUBJECTIVE PART:

 

How the two dimensional array is related to the matrix .2 MARKS

Assuming that “num” is a 2D array of character than what does statement *num contains? 2MARKS

 

 

Write a program in which you prompt the user to take 10 values in array and then display them ,sort the array and then find the maximum and minimum number in them . 3 MARKS

 

 

 

 

Write the output of the following: 5 MARKS

 

#include <iostream. h>

Union mytypes_t

{

            char c;

            int i;

            Float f;

}

mytypes;

 

int main();

{

 

            mytypes.c=’H’;

            mytypes.i=’15’;

 

coutsize of (mytypes)endl;

 

            mytypes.i=’15’;

            mytypes.c=’H’;

 

coutsize of (mytypes)endl;

 

return0;

 

}

 

 

Explain the logic of each statement:  5 MARKS

     Streampos orig=aFile,tellp();

     aFile.seekp(0.ios::end);

RSS

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

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

.