php hit counter

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
cs201 current mid term paper 12 may 2011
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support
#1
MIDTERM EXAMINATION
Spring 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

► Linking

► Compiling

► Loading

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
© 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


Mujay jitney sawal yaad thay wo main ny likh diayah

0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply


Messages In This Thread
cs201 current mid term paper 12 may 2011 - by Vuhelper - 05-13-2011, 04:53 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  BNK603 Consumer Banking Mid Term Papers Fall Semester 2012 Vuhelper 0 4,740 11-24-2012, 09:28 PM
Last Post: Vuhelper
  pak301- Final Term Solved Papers for 2011 Xpert 1 7,344 02-09-2012, 12:29 PM
Last Post: David
  cs401 midterm paper november2011 thewaqasyaqoob 1 3,982 11-30-2011, 01:10 AM
Last Post: Xpert
  eng201 midterm paper subjective 26th November, 2011 Xpert 2 4,967 11-27-2011, 05:27 PM
Last Post: Xpert
  ACC501 Midterm subjective paper shared by student 26th Noivember, 2011 Xpert 0 3,140 11-26-2011, 11:46 PM
Last Post: Xpert
  cs403 database management midterm current paper of fall 2011 on 26th November Xpert 0 2,856 11-26-2011, 11:35 PM
Last Post: Xpert
  CS507 mid term exam of today fall november 2011 Vuhelper 1 3,185 11-26-2011, 08:23 PM
Last Post: Vuhelper
  eco401 mid term today current paper fall november 2011 Vuhelper 0 3,149 11-26-2011, 08:21 PM
Last Post: Vuhelper
  acc501 mid term current solve paper fall November 2011 Vuhelper 0 3,565 11-26-2011, 08:08 PM
Last Post: Vuhelper
  CS601 Current Spring 2011 Final Term VU Paper 20 July 2011 Vuhelper 1 3,147 11-21-2011, 02:33 PM
Last Post: sid786

Forum Jump:


Users browsing this thread: 1 Guest(s)
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support