VUsolutions Transferred to AchiKhasi.com
From December 2011, this blog www.VUsolutions.blogspot.com is transferred to http://achikhasi.com/vu/ . So, you may visit http://achikhasi.com/vu/ for latest study related help.
Back to home VUsolutions
VUsolutions Fans Club [join us for MORE solutions]
VUsolutions on Facebook
Important & Cool Links
Islamic Books in Urdu ! Beauty Tips in Urdu ! Online VU Lectures ! Unique Wallpapers ! Cooking Recipes - Urdu ! Women Kahani Ghar ! Health Tips in Urdu ! Showbiz Hidden Stories ! News Updates Online ! Bachon Ki Duniya ! Virtual University Study ! Prep to PhD Study Help ! Girls Women Block ! AIOU Study Block ! News & Politics Block ! Mix Plate Block - Others
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
► n elements
► (n+1) elements
► 2(n+1) elements
► 2(n+1) elements
Question No: 4 ( Marks: 1 ) - Please choose one
► * operator
► -> operator
► && operator
► & operator
Question No: 5 ( Marks: 1 ) - Please choose one
► 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 )
Ans:
int matrix[0][0]=2
int matrix[1][0]=2
int matrix[2][0]=2
Question No: ( Marks: 2 ) - Please choose one_____________
Question No: ( Marks: 2 )
Question No: ( Marks: 3 )
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 )
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_____________
Back to home VUsolutions
Shaadi.com: Just create ur account & find ur partner or EARN money, its reall & EASY
VUsolutions Followers (Join NOW and Get Extra Benefits)
VU related Blogs
Install LATEST toolbar having lot of features - GET solutions on Desktop
| toolbar powered by Conduit |