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 Mid Term Papers Nov 2011, (Fall 2011)

Current Mid Term Papers Nov 2011, (Fall 2011)

Current Spring 2011 Papers, May 2011 Papers, Mid Term Spring 2011 Papers, Solved Papers, Solved Past Papers, Solved MCQs

+ 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: 1631

Replies to This Discussion

Please Share your Current Papers Questions/Pattern here to help each other. Thanks

marketinng paper nov 2011

differentiate  performance quality and conference quality

2:define culture ,sub culture and social culture

3:explain external factors.

most of mcq arre from

lecture nn 17 ,18 and 19

mcq from target marketing

My TODAY PAPER CS201

bc090400568

MCQs From PAST Papers

Like

1)      While loop is  infinte  if?

2)      Cin is used to get value from?

3)      Etc mcqs

4)      Of which operator gives false if two are true of false: XOR

Short Questions

1)      *num and num& difference.

2)      Which one will you prefer :random or sequential access .Reason

3)      A code snipet was there of strings to calculate bytes

4)      Cin function to compare two strings

Long

1)      Write a program which gets input string from user and matches it with antoher “This is my Pakistan”.

For example if user enter “my” then the output will be “string found” or in case it doesnot matches “ Not Found”.

2)  Write a program which get input from user as an integer array and uses pointer to                       print it in reverse  order.

my current paper of cs201
20 mcqz
most of last lectures 15-21
question from matirx programiming
multidomintiona arrays
file handling
pointers
out put of program etc

CS_201 Current Paper

80% MCQz from handout 20% from past paper

some questions are here

Q.1 Difference between *num and &num
Q.2 syntax of array
Q.3 [3x3] write in 2D sequence with help of event handler and use pointers
all remaining questions was Arrays And Pointer
read Arrays and Pointers Lecture carefully
sorry i haven't remember remaining questions coding

CS201 Current mid term paper fall 2011

Attachments:

CS_201 Current Paper

80% MCQz from handout 20% from past paper

some questions are here

Q.1 Difference between *num and &num
Q.2 syntax of array
Q.3 [3x3] write in 2D sequence with help of event handler and use pointers
all remaining questions was Arrays And Pointer
read Arrays and Pointers Lecture carefully
sorry i haven't remember remaining questions coding
[/left]

MIDTERM  EXAMINATION

2011

CS201- Introduction to Programming

Question No: 1      ( Marks: 1 ) - Please choose one

Initialization of variable at the time of definition is,

► Must

► Necessary

► Good Programming

► None of the given options

Question No: 2      ( Marks: 1 ) - Please choose one

Preprocessor program perform its function before ______ phase takes place.

► Editing

► Compiling

Question No: 3 ( Marks: 1 ) - Please choose one

If there are 2(n+1) elements in an array then what would be the number of iterations required to

search a number using binary search algorithm?

► n elements

► (n+1) elements

► 2(n+1) elements

► 2(n+1) elements

Question No: 4 ( Marks: 1 ) - Please choose one

Which of the following operator is used to access the value of variable pointed to by a pointer?

► * operator

► -> operator

► && operator

► & operator

Question No: 5 ( Marks: 1 ) - Please choose one

Analysis is the -------------- step in designing a program

► Last

► Middle

► Post Design

► First

Question No: 6 ( Marks: 1 ) - Please choose one_______________

When a pointer is incremented, it actually jumps the number of memory addresses

►According to data type (Pg 160)

►1 byte exactly

►1 bit exactly

►A pointer variable can not be incremented

Question No: 7 ( Marks: 1 ) - Please choose one_____________

Call by reference mechanism should be used in a program when there is

i. large amount of data to be passed

ii. small amount of data to be passed

iii. need to change the passed data

iv. no need to change the passed data

Choose the appropriate option for the above case.

► (i) and (ii) only

►(i) and (iii) only

►(ii) and (iii) only

►(ii) and (iv) only

Question No: 8 ( Marks: 1 ) - Please choose one_____________

If an array has 100 elements, what is allowable range of subscripts?

(a) 0 - 99

(b) 1 - 99

(c) 0 - 100

(d) 1 - 100

Question No: 9 ( Marks: 1 ) - Please choose one_____________

Initialization of variable at the time of definition is,

Must

Necessary

Good Programming

None of the given options

Question No:   ( 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.

Ans:

int matrix[0][0]=2

int matrix[1][0]=2

int matrix[2][0]=2

Question No:  ( Marks: 2 ) - Please choose one_____________

Explain smart pointer

Question No:     ( Marks: 2 )

which standard library we use in programming to read , write files

Question No:     ( 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 ;

}

Ans:

Int x=10….No ending semicolon.

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

Question No:     ( Marks: 3 )

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

Ans:Yes,we use assignment operator,whenever we use objects that allocate memory it is important that assignment operator should be defined for it,otherwise default operator will copy the value of addressed and pointers.

Question No: ( Marks: 5 ) - Please choose one_____________

Write difference between Random access and Sequential access file

Current mid term paper of CS201

Attachments:

MCQs From PAST Papers
Like
1) While loop is infinte if?
2) Cin is used to get value from?
3) Etc mcqs
4) Of which operator gives false if two are true of false: XOR
Short Questions
1) *num and num& difference.
2) Which one will you prefer :random or sequential access .Reason
3) A code snipet was there of strings to calculate bytes
4) Cin function to compare two strings
Long
1) Write a program which gets input string from user and matches it with antoher “This is my Pakistan”.
For example if user enter “my” then the output will be “string found” or in case it doesnot matches “ Not Found”.
2) Write a program which get input from user as an integer array and uses pointer to print it in reverse order

Q1- Determine the value of m and n after the execution of code given below.
int m = 44;
int* p = &m;
int& r = m;
int n = (*p)++;
int* q = p - 1;
++*q;
Assume that integers occupy 4 bytes and that m is stored in memory. (5 MARKS)
Q2- Write a program which defines two strings "Hello" and "Pakistan", merges both the strings using string manipulation function and displays on the screen. (5)
Q3- How the function strcpy() is different from the function strncpy() in terms of their working?
Q4- Determine the output of the given code segment.
#include <iostream.h>
main()
{
char *name[] = {"Ali", "Ahmad", "Riaz"};
int x;
int y;

x = sizeof(name);
y = sizeof(*name);

coutxendly;
return 0;
}
Q5- We know that random method for accessing the files increases the performance but there are certain constrainsts on it. Mention those constraints
Q6- Write the code to access the element at third row and second column of a 2D array uses pointer named arrayptr .

Latest Activity

1 second ago
Zoey D liked kiran shahzadi's discussion Vu Books For sale
10 seconds ago
Zoey D liked Zoey D's discussion Tm yaad hmen bhi kr lena (◕‿◕✿)
18 seconds ago
49 seconds ago
1 minute ago
Zoey D liked Zoey D's discussion ゜゜・ Bara Dushwar Lgta Hei ・゜゜
3 minutes ago
Zoey D replied to Zoey D's discussion ⋆°º ⋆ Wo Taluq ⋆°º ⋆
4 minutes ago
Zoey D replied to Zoey D's discussion My Reaction ≧◠‿◠≦✌
5 minutes ago

1

2

3

HELP SUPPORT

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