We have been working very hard since 2009 to facilitate in your learning Read More. We can't keep up without your support. Donate Now.

www.vustudents.ning.com

 www.bit.ly/vucodes + Link For Assignments, GDBs & Online Quizzes Solution www.bit.ly/papersvu + Link For Past Papers, Solved MCQs, Short Notes & More

# CS201 Current Midterm papers Dated 11-05-2012 to 22-05-2012

CS201 Current Midterm papers Dated 11-05-2012 to 22-05-2012

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

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

Views: 3176

### Replies to This Discussion

in long questions

elements of letter = 5 marks
stucture of a porposal =5 marks
nd short question me defenitions ayi thi
mcq all in all past pepers me se ayee the.
best of luck frnds for remaining papers.

By reema

Subject Questions...
Q1. Write a program which will input ten integers into a array then sort it and find maximum and minimum integer in array.
Hint: Finding maximum and minimum is quite easier in sorted array. (10 Marks)
Q2. open() & close() function memory utilization advantages. (3 marks)
Q3. write down a syntax in which we can find the size of structure in bytes. (3 Marks)
Q4. Difference between and (& in pointers. (mark 5)
Q5. int num is an array then assign its address to point myPtr. (Mark 5)

Q1.write the code to perform the following tasks

a. Declare a 2D array of integers having two rows and three columns.
b.declare a pointer and point it to the above declared array.
Q2.suppose there is structure named STUDENT and we wish to evaluate the size of this structure, Hoe it can be accomplished in C++?
Q3.write the program which declares and initialize an array of 10 integers and then displays the 4th and 8th element of the array by using a pointer?
Q.4. if any programming language structures and arrays are tools for collecting things having some common properties what is main difference between a structure and an array? Q5.we can use a pointer to character or an array of characters to store a string in C/C++which one the mentioned approaches is the most suitable approach for storing the string and why?

Q.6.Explain the logic of given program and write down its output
#include <iostream.h>
#include <string.h>
int main ()
{
char str [] =” This is a line.”
Char*p
p = strctr(str,’s’);
while (p!=Null) {
cout ”found at \n”p-str+1>>
P=strctr (p+1,’s’);
Return 0;
}

Paper 1:
Total 26 Questions.

Identify each of these functions as character conversion functions or manipulation functions.
1. int isprint( int c )
int tolower( int c )

How can we declare a character array, is it different from integer array declaration? Give one example of character array declaration.
Write the output of following program.
#include<iostream.h>

int main()
{
int a[5] = {5, 1, 15, 20, 25};
int i, j, k, l, m;

i = ++a[1];
j = a[1]++;
k = a[i++];
l = a[i--]*i;
m = a[++i] - 1;

couti" "j" "k " "l" "m;

}

Write the code for a structure called Inventory having the following elements:
• A character array named partName
• An integer named partNumber
• An integer named stock.

Write the code of a main() function which takes command-line arguments and returns an integer type value.

Write a program which defines two strings "Hello" and "Pakistan", merges both the strings using string manipulation function and displays on the screen.

Write the output of following program.
#include<iostream.h>

int main()
{
int a[5] = {5, 1, 15, 20, 25};
int i, j, k, l, m;

i = ++a[1];
j = a[1]++;
k = a[i++];
l = a[i--]*i;
m = a[++i] - 1;

couti" "j" "k " "l" "m;

20 mcqs.mostly from past papers & 15-22 lectures
21) which bit of number is used as a sign bit?
22) open() & close() function advantage of memory utilization..
23) int array[7] is an int array type.what will b the statement for the fourth element of this array?
24 & 25 )write the output of the given code. 5 marks each

Subject Questions...
Q1. Write a program which will input ten integers into a array then sort it and find maximum and minimum integer in array.
Hint: Finding maximum and minimum is quite easier in sorted array. (10 Marks)
Q2. open() & close() function memory utilization advantages. (3 marks)
Q3. write down a syntax in which we can find the size of structure in bytes. (3 Marks)
Q4. Difference between and (& in pointers. (mark 5)
Q5. int num is an array then assign its address to point myPtr. (Mark 5)

today 17 may my CS201 paper

20 MCQs thy then 6 long questions thy. top pa mera paper ha. n us k bad wo paper jo maine paper se pehly yahan se save keay. long kafi inhi mai se aye meray. jin ka CS201 paper abi rehta ha wo ye complete file solve kar lay. baki mid k MCQs se ho jaye ga.

Attachments:

saira abbas thanks for sharing paper

Paper 1
Total 26 Questions.

Identify each of these functions as character conversion functions or manipulation functions.
1. int isprint( int c )
int tolower( int c )

How can we declare a character array, is it different from integer array declaration? Give one example of character array declaration.
Write the output of following program.
#include<iostream.h>

int main()
{
int a[5] = {5, 1, 15, 20, 25};
int i, j, k, l, m;

i = ++a[1];
j = a[1]++;
k = a[i++];
l = a[i--]*i;
m = a[++i] - 1;

couti" "j" "k " "l" "m;

}

Write the code for a structure called Inventory having the following elements:
• A character array named partName
• An integer named partNumber
• An integer named stock.
Write the code of a main() function which takes command-line arguments and returns an integer type value.

Write a program which defines two strings "Hello" and "Pakistan", merges both the strings using string manipulation function and displays on the screen.

Write the output of following program.
#include<iostream.h>

int main()
{
int a[5] = {5, 1, 15, 20, 25};
int i, j, k, l, m;

i = ++a[1];
j = a[1]++;
k = a[i++];
l = a[i--]*i;
m = a[++i] - 1;

couti" "j" "k " "l" "m;

Paper 2:

There are
20 MCQ
2x2 Q
3x3 Q
5x5 Q

MCQ most programming base, like what is the syntax or output etc.

Q: tell the size of() value of a structure variable.
Q: use of the keyword “const”
Q: which of these functions are string manipulation and conversion function?
Q: a program which input a telephone number with city code and recognize if it is from lhr or not.
Q: an program is given and we have to tell the output. Program consists array and loop.
Q: how many memory locations will a pointer jump if it is incremented.

Paper 3:
5 marks ka ik question tha jis main code likha hua tha aur us code ka logic byan krna tha.
Write the code for a structure called Inventory having the following elements:
A character array named partName
An integer named partNumber
An integer named stock.
Declare a 2D array of integers having two rows and three columns.
We know that random method for accessing the files increases the performance but there are certain constrainsts on it. Mention those constraints
Write the code to access the element at third row and second column of a 2D array uses pointer named arrayptr .
C++ views each file as a sequential stream of _______________.
► Bytes
► Bits
► 0’s or 1’s
► Words
If it is required to copy an array to another array then,
► Both arrays must be of the same size and data type
► Both arrays may be of different size
► Both arrays may be of different data type
► Both arrays may be of different size and type

What will be the output of following code?
int x = 10 ;
cout “x =” x ;
► 10
► “x=10”
► x=10
► 10=x
C++ views each file as a sequential stream of________________ .
►Bytes
►Bits
►0’s or 1’s
►Words

1 mcqs tha agr semicolon mising ho to kon sa error hoga. Logical,syntc,runtime or compile time
Relational operaters diay huay thay aur pucha gia tha kon say operator hen.
10+6*2/6 ko solve krna tha

Paper 4:
DevCpp, calculator not allowed.
most of the previous papers questions were given
Long questions were on, to write down the output of the given programme.( in these loop structures were given)
Question on output of array elements. (very basic one) marks ranging from 2 to 3.
write down a programme on the function involving the swap of integer values without using any other variable (laast one of 6 marks)
mcq's including switch statemnet, type of software, word processor is either a random accesing file or serial acces file, a lot of questioning about pointers and arrays, the question of past papers in which a variable x=7-then what will be the value of x after x %=2.
All in all the paper was easy.

Paper 5:
Q1. Write a program which will input ten integers into a array then sort it and find maximum and minimum integer in array.
Hint: Finding maximum and minimum is quite easier in sorted array. (10 Marks)
Q2. open() & close() function memory utilization advantages. (3 marks)
Q3. write down a syntax in which we can find the size of structure in bytes. (3 Marks)
Q4. Difference between (*) and (&) in pointers. (mark 5)
Q5. int num is an array then assign its address to point myPtr. (Mark 5)
etc.... etc... etc... etc..
Note: pointers mein se zyada questions aaye hain.

Paper 6:
20 mcqs.mostly from past papers & 15-22 lectures
21) which bit of number is used as a sign bit?
22) open() & close() function advantage of memory utilization..
23) int array[7] is an int array type. what will b the statement for the fourth element of this array?
24 & 25 )write the output of the given code. 5 marks each

## Latest Activity

12 minutes ago
17 minutes ago
28 minutes ago
32 minutes ago
Mani Siddiqui BS VIII posted discussions
57 minutes ago
2 hours ago
2 hours ago
2 hours ago

1

2

3

## HELP SUPPORT

This is a member-supported website. Your contribution is greatly appreciated!